50 #if NEBULA_MEMORY_STATS
51 uint GetAllocCount()
const;
64 #if NEBULA_MEMORY_STATS
65 volatile long allocCount;
76#if NEBULA_MEMORY_STATS
78GenericMemoryPool::GetAllocCount()
const
80 return this->allocCount;
92 return (blockSizeWithHeader + padding);
static const uint FreeBlockPattern
get current allocation count
Definition genericmemorypool.h:55
ubyte * poolEnd
Definition genericmemorypool.h:70
uint GetBlockSize() const
get block size
Definition genericmemorypool.h:108
void Free(void *ptr)
deallocate a block from the pool
Definition genericmemorypool.cc:115
Memory::HeapType heapType
Definition genericmemorypool.h:59
void * Alloc()
allocate a block from the pool (NOTE: returns 0 if pool exhausted!)
Definition genericmemorypool.cc:90
GenericMemoryPool()
constructor
Definition genericmemorypool.cc:16
static const int BlockAlign
Definition genericmemorypool.h:57
Threading::SafeQueue< ubyte * > freeList
Definition genericmemorypool.h:68
uint blockSize
Definition genericmemorypool.h:60
uint GetNumBlocks() const
get number of allocated blocks in pool
Definition genericmemorypool.h:99
static const uint NewBlockPattern
Definition genericmemorypool.h:56
~GenericMemoryPool()
destructor
Definition genericmemorypool.cc:33
uint GetAlignedBlockSize() const
get aligned block size
Definition genericmemorypool.h:117
uint numBlocks
Definition genericmemorypool.h:63
ubyte * poolStart
Definition genericmemorypool.h:69
uint GetPoolSize() const
get pool size
Definition genericmemorypool.h:126
bool IsPoolBlock(void *ptr) const
return true if block is owned by this pool
Definition genericmemorypool.h:135
void Setup(Memory::HeapType heapType, uint blockSize, uint numBlocks)
setup the memory pool
Definition genericmemorypool.cc:54
static uint ComputeAlignedBlockSize(uint blockSize)
compute the actual block size including alignment and management data
Definition genericmemorypool.h:88
uint poolSize
Definition genericmemorypool.h:62
uint alignedBlockSize
Definition genericmemorypool.h:61
Thread-safe version of Util::Queue.
Definition safequeue.h:27
Definition gamecontentserverbase.cc:10
HeapType
Heap types are defined here.
Definition osxmemoryconfig.h:25
unsigned char ubyte
Definition types.h:36
unsigned int uint
Definition types.h:33