![]() |
ucx
UAP Common Extensions
|
The basic structure of a memory pool. More...
#include <mempool.h>
Data Fields | |
| const CxAllocator *const | base_allocator |
| The used allocator, initialized with the cxDefaultAllocator. | |
| const CxAllocator * | allocator |
| The provided allocator. | |
| void ** | data |
| Array of pooled memory. | |
| size_t | size |
| Number of pooled memory items. | |
| size_t | capacity |
| Memory pool capacity. | |
| struct cx_mempool_foreign_memory_s * | registered |
| Array of registered memory. | |
| size_t | registered_size |
| Number of registered memory items. | |
| size_t | registered_capacity |
| Capacity for registered memory. | |
| cx_destructor_func | destr |
| A destructor that shall be called before deallocating a memory block. | |
| cx_destructor_func2 | destr2 |
| A destructor that shall be called before deallocating a memory block. | |
| void * | destr2_data |
Additional data for the destr2. | |
The basic structure of a memory pool.
Should be the first member of an actual memory pool implementation.
| cx_destructor_func cx_mempool_s::destr |
A destructor that shall be called before deallocating a memory block.
This destructor MUST NOT free the memory itself.
It is guaranteed that this destructor is called after the individual destructor of the memory block and before destr2.
| cx_destructor_func2 cx_mempool_s::destr2 |
A destructor that shall be called before deallocating a memory block.
This destructor MUST NOT free the memory itself.
It is guaranteed that this destructor is called after the individual destructor of the memory block and destr.