50 #if NEBULA_MEMORY_STATS
51 uint GetAllocCount()
const;
64 #if NEBULA_MEMORY_STATS
65 volatile long allocCount;
76#if NEBULA_MEMORY_STATS
78Win32MemoryPool::GetAllocCount()
const
80 return this->allocCount;
92 return (blockSizeWithHeader + padding);
A simple thread-safe memory pool.
Definition win32memorypool.h:25
ubyte * poolStart
Definition win32memorypool.h:69
uint poolSize
Definition win32memorypool.h:62
static const uint NewBlockPattern
Definition win32memorypool.h:56
uint alignedBlockSize
Definition win32memorypool.h:61
~Win32MemoryPool()
destructor
Definition win32memorypool.cc:35
ubyte * poolEnd
Definition win32memorypool.h:70
uint blockSize
Definition win32memorypool.h:60
void Free(void *ptr)
deallocate a block from the pool
Definition win32memorypool.cc:119
static uint ComputeAlignedBlockSize(uint blockSize)
compute the actual block size including alignment and management data
Definition win32memorypool.h:88
uint numBlocks
Definition win32memorypool.h:63
uint GetBlockSize() const
get block size
Definition win32memorypool.h:108
uint GetAlignedBlockSize() const
get aligned block size
Definition win32memorypool.h:117
void * Alloc()
allocate a block from the pool (NOTE: returns 0 if pool exhausted!)
Definition win32memorypool.cc:94
Memory::HeapType heapType
Definition win32memorypool.h:59
static const int BlockAlign
Definition win32memorypool.h:57
SLIST_HEADER listHead
Definition win32memorypool.h:68
Win32MemoryPool()
constructor
Definition win32memorypool.cc:17
void Setup(Memory::HeapType heapType, uint blockSize, uint numBlocks)
setup the memory pool
Definition win32memorypool.cc:57
bool IsPoolBlock(void *ptr) const
return true if block is owned by this pool
Definition win32memorypool.h:135
static const uint FreeBlockPattern
get current allocation count
Definition win32memorypool.h:55
uint GetNumBlocks() const
get number of allocated blocks in pool
Definition win32memorypool.h:99
uint GetPoolSize() const
get pool size
Definition win32memorypool.h:126
HeapType
Heap types are defined here.
Definition osxmemoryconfig.h:25
[TODO: Describe Win32 subsystem]
unsigned char ubyte
Definition types.h:34
unsigned int uint
Definition types.h:31