void * free_data
memory pool data / head of the free list
void memarray_free(memarray_t *mem, void *ptr)
Free memory chunk in memarray pool.
size_t size
size of single list element
void * memarray_alloc(memarray_t *mem)
Allocate memory chunk in memarray pool.
void * memarray_calloc(memarray_t *mem)
Allocate and clear memory chunk in memarray pool.
void memarray_init(memarray_t *mem, void *data, size_t size, size_t num)
Initialize memarray pool with free list.
size_t num
max number of elements in list