43 #if NEBULA_MEMORY_STATS
A simple thread-safe memory pool.
Allocates small memory blocks from an array of fixed-size memory pools.
Definition poolarrayallocator.h:22
void Free(void *ptr, SizeT size)
free a block of memory from the pool array with original block size
Definition poolarrayallocator.cc:107
void * Alloc(SizeT size)
allocate a block of memory from the pool
Definition poolarrayallocator.cc:74
const char * name
Definition poolarrayallocator.h:50
MemoryPool memoryPools[NumPools]
Definition poolarrayallocator.h:51
void Setup(const char *name, Memory::HeapType heapType, uint poolSizes[NumPools])
setup the pool allocator, name must be a static string!
Definition poolarrayallocator.cc:38
Memory::HeapType heapType
Definition poolarrayallocator.h:49
~PoolArrayAllocator()
destructor
Definition poolarrayallocator.cc:26
const MemoryPool & GetMemoryPool(IndexT index) const
access to memory pool at pool index (for debugging)
Definition poolarrayallocator.cc:149
PoolArrayAllocator()
constructor
Definition poolarrayallocator.cc:16
static const SizeT NumPools
number of pools
Definition poolarrayallocator.h:25
Allocates memory using the TLSF method (http://www.gii.upv.es/tlsf/files/ecrts04_tlsf....
Definition arenaallocator.h:31
HeapType
Heap types are defined here.
Definition osxmemoryconfig.h:25
int SizeT
Definition types.h:49
unsigned int uint
Definition types.h:31
int IndexT
Definition types.h:48