67 #define ucx_mempool_new_default() ucx_mempool_new(16) void ucx_mempool_free(UcxMempool *pool, void *ptr)
Frees pooled memory.
Definition: mempool.c:187
universe@390:
UCX mempool structure.
Definition: mempool.h:52
universe@390:
void ucx_mempool_destroy(UcxMempool *pool)
Destroys a memory pool.
Definition: mempool.c:209
universe@390:
Main UCX Header providing most common definitions.
universe@390:
int ucx_mempool_chcap(UcxMempool *pool, size_t newcap)
Resizes a memory pool.
Definition: mempool.c:103
universe@390:
void ucx_mempool_reg_destr(UcxMempool *pool, void *ptr, ucx_destructor destr)
Registers a destructor function for the specified (non-pooled) memory.
Definition: mempool.c:229
universe@390:
void * ucx_mempool_malloc(UcxMempool *pool, size_t n)
Allocates pooled memory.
Definition: mempool.c:123
universe@390:
size_t size
Memory pool size.
Definition: mempool.h:63
universe@390:
size_t ndata
Count of pooled memory items.
Definition: mempool.h:60
universe@390:
UCX allocator data structure containing memory management functions.
Definition: allocator.h:88
universe@390:
void * ucx_mempool_calloc(UcxMempool *pool, size_t nelem, size_t elsize)
Allocates a pooled memory array.
Definition: mempool.c:148
universe@390:
void ** data
List of pointers to pooled memory.
Definition: mempool.h:57
universe@390:
UcxMempool * ucx_mempool_new(size_t n)
Creates a memory pool with the specified initial size.
Definition: mempool.c:67
universe@390:
void * ucx_mempool_realloc(UcxMempool *pool, void *ptr, size_t n)
Reallocates pooled memory.
Definition: mempool.c:162
universe@390:
Allocator for custom memory management.
universe@390:
UcxAllocator * allocator
UcxAllocator based on this pool.
Definition: mempool.h:54
universe@390:
void ucx_mempool_set_destr(void *ptr, ucx_destructor func)
Sets a destructor function for the specified memory.
Definition: mempool.c:225
universe@390:
void(* ucx_destructor)(void *)
A function pointer to a destructor function.
Definition: ucx.h:72
universe@390: