![]() |
Elm
2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
#include <elm/alloc/BlockAllocator.h>
Public Member Functions | |
BlockAllocator (int block_per_chunk=default_block_per_chunk) | |
T * | allocate () |
void | free (T *p) |
Static Public Attributes | |
static const int | default_block_per_chunk = 32 |
An allocator for fixed-size block. Initial allocation is performed quickly in a stack allocator but fried blocks are added to a free list allowing quick re-use of fried blocks.
|
inline |
Block allocator builder.
block_per_chunk | Number of block in each allocated chunk. |
T | Type of managed blocks. |
|
inline |
|
inline |
|
static |