55 #define FOR_ALL_USEDMEM(this,ptr) for(ptr=mpool_get_next_usedmem(this, NULL); ptr!=NULL; ptr = mpool_get_next_usedmem(this, ptr )) void mpool_delete(MemoryPool this, void(*destructor)(void *))
free MemoryPool class
size_t mpool_get_usedcnt(MemoryPool this)
get used cnt
void * mpool_get(MemoryPool this)
get memory from pool
struct memorypool_t * MemoryPool
MemoryPool class definition, to use API.
void * mpool_get_next_usedmem(MemoryPool this, void *ptr)
get used memory
void mpool_release(MemoryPool this, void *ptr)
release memory to pool
MemoryPool mpool_create(size_t max_size, size_t max_cnt, int is_multithread, void(*constructor)(void *this, void *constructor_parameter), void *constructor_parameter)
create MemoryPool class
MemoryPool class member definition, detail is defined in C file.