35 #define NDN_MEMORY_POOL_RESERVE_SIZE(block_size, block_count) \ 36 (sizeof(void*) * ((block_count) + 1) + (block_size) * (block_count)) void ndn_memory_pool_init(void *pool, size_t block_size, size_t block_count)
Initialize a memory array pool for block_count elements in the size of block_size.
Definition: memory-pool.c:23
int ndn_memory_pool_free(void *pool, void *ptr)
Free allocated memory block.
Definition: memory-pool.c:55
uint8_t * ndn_memory_pool_alloc(void *pool)
Allocate a new block in size block_size.
Definition: memory-pool.c:42