libusual  0.1
Functions | Variables
usual/cxextra.h File Reference

Extra allocators for cxalloc. More...

Functions

CxMemcx_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.
CxMemcx_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

Detailed Description

Extra allocators for cxalloc.


Function Documentation

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.


Variable Documentation

Allocator that exits on error.

.ctx should be pointer to actual allocator

nofail for libc