Planeshift
|
#include <poolallocator.h>
Public Member Functions | |
void | CallFromDelete (TEMPLATE_CLASS *obj) |
Places a block back on the list of available blocks. Does NOT release memory back to the heap - ever. More... | |
TEMPLATE_CLASS * | CallFromNew () |
Returns a new block from the list of available blocks. Allocates another pool if necessary. More... | |
bool | PointerCameFromPool (void *ptr) |
PoolAllocator (int items_per_pool=POOLALLOC_DEFAULT_ALLOCATION_OBJECTS) | |
PoolAllocator constructor. Sets list heads to NULL and the per-pool object count to the passed value (or default). More... | |
~PoolAllocator () | |
PoolAllocator destructor. Releases the memory assigned to the pools back to the heap and clears the pool and free lists. More... | |
Definition at line 80 of file poolallocator.h.
|
inline |
PoolAllocator constructor. Sets list heads to NULL and the per-pool object count to the passed value (or default).
Definition at line 114 of file poolallocator.h.
|
inline |
PoolAllocator destructor. Releases the memory assigned to the pools back to the heap and clears the pool and free lists.
Definition at line 122 of file poolallocator.h.
|
inline |
Places a block back on the list of available blocks. Does NOT release memory back to the heap - ever.
Definition at line 164 of file poolallocator.h.
|
inline |
Returns a new block from the list of available blocks. Allocates another pool if necessary.
Definition at line 139 of file poolallocator.h.
|
inline |
Definition at line 187 of file poolallocator.h.