This commit is contained in:
hathach committed 2018-11-09 12:48:43 +07:00
1 parent c3b3317e9c
commit ee6aa455ba
6 files changed
+2 -35

No files matched your search

@@ -128,7 +128,6 @@ void vPortDefineHeapRegions( const HeapRegion_t * const pxHeapRegions ) PRIVILEG
*/
void *pvPortMalloc( size_t xSize ) PRIVILEGED_FUNCTION;
void vPortFree( void *pv ) PRIVILEGED_FUNCTION;
void *pvPortRealloc( void* pv, size_t new_size) PRIVILEGED_FUNCTION; // Adafruit TODO remove later
void vPortInitialiseBlocks( void ) PRIVILEGED_FUNCTION;
size_t xPortGetFreeHeapSize( void ) PRIVILEGED_FUNCTION;
size_t xPortGetMinimumEverFreeHeapSize( void ) PRIVILEGED_FUNCTION;
@@ -92,29 +92,3 @@ void vPortFree( void *pv )
( void ) xTaskResumeAll();
}
}
void *pvPortRealloc( void* pv, size_t new_size)
{
void *pvReturn;
vTaskSuspendAll();
{
pvReturn = realloc( pv, new_size );
traceMALLOC( pvReturn, new_size );
}
( void ) xTaskResumeAll();
#if( configUSE_MALLOC_FAILED_HOOK == 1 )
{
if( pvReturn == NULL )
{
extern void vApplicationMallocFailedHook( void );
vApplicationMallocFailedHook();
}
}
#endif
return pvReturn;
}
-5
View File
@@ -84,11 +84,6 @@ static inline void rtos_free( void *pv )
return (xTaskGetSchedulerState() == taskSCHEDULER_NOT_STARTED) ? free(pv) : vPortFree(pv);
}
// TODO used by nffs, removed later
static inline void* rtos_realloc(void* pv, size_t new_size)
{
return (xTaskGetSchedulerState() == taskSCHEDULER_NOT_STARTED) ? realloc(pv, new_size) : pvPortRealloc(pv, new_size);
}
#endif
#ifdef __cplusplus // Visible only with cplusplus
-1
View File
@@ -37,7 +37,6 @@ delay_ns KEYWORD2
# RTOS
rtos_malloc KEYWORD2
rtos_free KEYWORD2
rtos_realloc KEYWORD2
nrf52_flash_init KEYWORD2
nrf52_flash_erase_sector KEYWORD2
@@ -15,7 +15,7 @@
#include <bluefruit.h>
#include <FileIO.h>
/* This example print out NFFS content up to
/* This example print out External Flash contents up to
* MAX_LEVEL level of directories (including root)
* WARNING: This example uses recursive call to print out directory tree
* be extra careful, high number of MAX_LEVEL can cause memory overflow
@@ -15,7 +15,7 @@
#include <bluefruit.h>
#include <FileIO.h>
/* This example print out NFFS content up to
/* This example print out Internal Flash contents up to
* MAX_LEVEL level of directories (including root)
* WARNING: This example uses recursive call to print out directory tree
* be extra careful, high number of MAX_LEVEL can cause memory overflow