10 #include <threadx/tx_api.h> 12 #pragma mark - Declarations - 38 assert(addr && (size > 0));
46 r = tx_byte_pool_create(&
malloc_pool_,
"Heap Memory Pool", addr, size);
47 assert(r == TX_SUCCESS);
70 unsigned r = tx_byte_allocate(&
malloc_pool_, &ptr, size, TX_WAIT_FOREVER);
73 assert(r == TX_SUCCESS &&
"malloc failed");
87 unsigned r = tx_byte_release(ptr);
88 assert(r == TX_SUCCESS);
static volatile bool initialized_
static TX_BYTE_POOL malloc_pool_
ThreadX internal memory pool stucture.
void * malloc(size_t size)
void malloc_init(void)
Initialize Malloc.
void malloc_addblock(void *addr, size_t size)
Assign blocks of memory for use by malloc().