#include <allocator.h>
Public Member Functions | |
HbrAllocator (size_t *memorystat, int blocksize, void(*increment)(size_t bytes), void(*decrement)(size_t bytes), size_t elemsize=sizeof(T)) | |
Constructor. More... | |
~HbrAllocator () | |
Destructor. More... | |
T * | Allocate () |
Create an allocated object. More... | |
void | Deallocate (T *) |
Return an allocated object to the block allocator. More... | |
void | Clear () |
Clear the allocator, deleting all allocated objects. More... | |
void | SetMemStatsIncrement (void(*increment)(size_t bytes)) |
void | SetMemStatsDecrement (void(*decrement)(size_t bytes)) |
HbrAllocator - derived from UtBlockAllocator.h, but embedded in libhbrep.
Definition at line 39 of file allocator.h.
HbrAllocator | ( | size_t * | memorystat, |
int | blocksize, | ||
void(*)(size_t bytes) | increment, | ||
void(*)(size_t bytes) | decrement, | ||
size_t | elemsize = sizeof(T) |
||
) |
Constructor.
Definition at line 84 of file allocator.h.
~HbrAllocator | ( | ) |
Destructor.
Definition at line 89 of file allocator.h.
T * Allocate | ( | ) |
Create an allocated object.
Definition at line 117 of file allocator.h.
void Clear | ( | ) |
Clear the allocator, deleting all allocated objects.
Definition at line 94 of file allocator.h.
void Deallocate | ( | T * | obj | ) |
Return an allocated object to the block allocator.
Definition at line 160 of file allocator.h.
|
inline |
Definition at line 60 of file allocator.h.
|
inline |
Definition at line 58 of file allocator.h.