libusual
0.1
|
Ops for allocator that takes context. More...
Data Fields | |
void *(* | c_alloc )(void *ctx, size_t len) |
Allocate memory. | |
void *(* | c_realloc )(void *ctx, void *p, size_t len) |
Resize existing allocation. | |
void(* | c_free )(void *ctx, const void *p) |
Free existing allocation. | |
void(* | c_destroy )(void *ctx) |
Release all memory in context. |
Ops for allocator that takes context.
NB! - they are not equivalent to cx_* API. The cx_* functions do additional sanitizing.
void*(* CxOps::c_alloc)(void *ctx, size_t len) |
Allocate memory.
len will not be 0.
void*(* CxOps::c_realloc)(void *ctx, void *p, size_t len) |
Resize existing allocation.
Both p and len will not be 0
void(* CxOps::c_free)(void *ctx, const void *p) |
Free existing allocation.
p will not be 0
void(* CxOps::c_destroy)(void *ctx) |
Release all memory in context.
This is not supported by all allocators.