7 #include <freertos/FreeRTOS.h> 8 #include <freertos/task.h> 20 #pragma mark - Definitions 25 #ifndef FREERTOS_HEAP_REGION_CNT 26 #define FREERTOS_HEAP_REGION_CNT 2 29 #pragma mark - Declarations - 52 #pragma mark - Private Functions - 54 static int cmp_heap(
const void* a,
const void* b)
56 const HeapRegion_t* ua = a;
57 const HeapRegion_t* ub = b;
59 return ((ua->pucStartAddress < ub->pucStartAddress)
61 : ((ua->pucStartAddress != ub->pucStartAddress)));
71 assert(addr && (size > 0));
120 ptr = pvPortMalloc(size);
#define FREERTOS_HEAP_REGION_CNT
static HeapRegion_t heap_regions[FREERTOS_HEAP_REGION_CNT+1]
static volatile bool initialized_
static const uint8_t heap_region_max
Maximum number of heap regions that can be specified.
static volatile uint8_t heap_region_cnt
Current number of allocated heap regions.
static int cmp_heap(const void *a, const void *b)
void malloc_addblock(void *addr, size_t size)
Assign blocks of memory for use by malloc().
void malloc_init(void)
Initialize Malloc.
void * malloc(size_t size)