libusual
0.1
|
Extra allocators for cxalloc. More...
Functions | |
CxMem * | cx_new_pool (CxMem *parent, size_t initial_size, unsigned int align) |
Creates allocator that pools all memory together, without keeping track of single objects, to be freed all together in one shot. | |
CxMem * | cx_new_tree (CxMem *parent) |
Creates allocator that remebers all allocations done under it and allows all of it to be freed together. | |
Variables | |
struct CxOps | cx_nofail_ops |
Allocator that exits on error. | |
CxMem | cx_libc_nofail |
nofail for libc |
Extra allocators for cxalloc.
CxMem* cx_new_pool | ( | CxMem * | parent, |
size_t | initial_size, | ||
unsigned int | align | ||
) |
Creates allocator that pools all memory together, without keeping track of single objects, to be freed all together in one shot.
realloc(), free() are partially supported for the last objec only.
CxMem* cx_new_tree | ( | CxMem * | parent | ) |
Creates allocator that remebers all allocations done under it and allows all of it to be freed together.
Supports hierarchical trees.
struct CxOps cx_nofail_ops |
Allocator that exits on error.
.ctx should be pointer to actual allocator
nofail for libc