Data Structures | |
struct | A_BLOCK_LINK |
union | xRTOS_HEAP |
Macros | |
#define | heapMINIMUM_BLOCK_SIZE ( ( size_t ) ( heapSTRUCT_SIZE * 2 ) ) |
#define | MPU_WRAPPERS_INCLUDED_FROM_API_FILE |
Typedefs | |
typedef struct A_BLOCK_LINK | xBlockLink |
Functions | |
static void | prvHeapInit (void) |
static void | prvInsertBlockIntoFreeList (xBlockLink *pxBlockToInsert) |
void * | pvPortMalloc (size_t xWantedSize) |
void | vApplicationMallocFailedHook (void) |
void | vPortFree (void *pv) |
void | vPortInitialiseBlocks (void) |
size_t | xPortGetFreeHeapSize (void) |
Variables | |
static const unsigned short | heapSTRUCT_SIZE = ( sizeof( xBlockLink ) + portBYTE_ALIGNMENT - ( sizeof( xBlockLink ) % portBYTE_ALIGNMENT ) ) |
static xBlockLink * | pxEnd = NULL |
static size_t | xFreeBytesRemaining = ( ( size_t ) configTOTAL_HEAP_SIZE ) & ( ( size_t ) ~portBYTE_ALIGNMENT_MASK ) |
static union xRTOS_HEAP | xHeap |
static xBlockLink | xStart |
static const size_t | xTotalHeapSize = ( ( size_t ) configTOTAL_HEAP_SIZE ) & ( ( size_t ) ~portBYTE_ALIGNMENT_MASK ) |
#define heapMINIMUM_BLOCK_SIZE ( ( size_t ) ( heapSTRUCT_SIZE * 2 ) ) |
Referenced by pvPortMalloc().
#define MPU_WRAPPERS_INCLUDED_FROM_API_FILE |
typedef struct A_BLOCK_LINK xBlockLink |
|
static |
References configASSERT, heapSTRUCT_SIZE, NULL, A_BLOCK_LINK::pxNextFreeBlock, xRTOS_HEAP::ucHeap, A_BLOCK_LINK::xBlockSize, xHeap, and xTotalHeapSize.
Referenced by pvPortMalloc().
|
static |
References pxEnd, A_BLOCK_LINK::pxNextFreeBlock, and A_BLOCK_LINK::xBlockSize.
Referenced by pvPortMalloc(), and vPortFree().
void* pvPortMalloc | ( | size_t | xWantedSize | ) |
void vApplicationMallocFailedHook | ( | void | ) |
vApplicationMallocFailedHook() will only be called if configUSE_MALLOC_FAILED_HOOK is set to 1 in FreeRTOSConfig.h. It is a hook function that will get called if a call to pvPortMalloc() fails. pvPortMalloc() is called internally by the kernel whenever a task, queue, timer or semaphore is created. It is also called by various parts of the demo application. If heap_1.c or heap_2.c are used, then the size of the heap available to pvPortMalloc() is defined by configTOTAL_HEAP_SIZE in FreeRTOSConfig.h, and the xPortGetFreeHeapSize() API function can be used to query the size of free heap space that remains (although it does not provide information on how the remaining heap might be fragmented).
vApplicationMallocFailedHook() will only be called if configUSE_MALLOC_FAILED_HOOK is set to 1 in FreeRTOSConfig.h. It is a hook function that will get called if a call to pvPortMalloc() fails. pvPortMalloc() is called internally by the kernel whenever a task, queue, timer or semaphore is created. It is also called by various parts of the demo application. If heap_1.c or heap_2.c are used, then the size of the heap available to pvPortMalloc() is defined by configTOTAL_HEAP_SIZE in FreeRTOSConfig.h, and the xPortGetFreeHeapSize() API function can be used to query the size of free heap space that remains (although it does not provide information on how the remaining heap might be fragmented).
vApplicationMallocFailedHook() will only be called if configUSE_MALLOC_FAILED_HOOK is set to 1 in FreeRTOSConfig.h. It is a hook function that will get called if a call to pvPortMalloc() fails. pvPortMalloc() is called internally by the kernel whenever a task, queue, timer or semaphore is created. It is also called by various parts of the demo application. If heap_1.c or heap_2.c are used, then the size of the heap available to pvPortMalloc() is defined by configTOTAL_HEAP_SIZE in FreeRTOSConfig.h, and the xPortGetFreeHeapSize() API function can be used to query the size of free heap space that remains (although it does not provide information on how the remaining heap might be fragmented).
Referenced by pvPortMalloc().
void vPortFree | ( | void * | pv | ) |
void vPortInitialiseBlocks | ( | void | ) |
size_t xPortGetFreeHeapSize | ( | void | ) |
|
static |
Referenced by prvHeapInit(), pvPortMalloc(), and vPortFree().
|
static |
Referenced by prvInsertBlockIntoFreeList().
|
static |
Referenced by xPortGetFreeHeapSize().
|
static |
Referenced by prvHeapInit().
|
static |
Referenced by pvPortMalloc().
|
static |
Referenced by prvHeapInit(), pvPortMalloc(), and vPortDefineHeapRegions().