zenilib
0.5.3.0
|
#include <PoolAlloc.h>
Classes | |
struct | tAllocState |
struct | tHeader |
Public Member Functions | |
TPoolAllocator (int growthIncrement=8 *1024, int allocationAlignment=16) | |
~TPoolAllocator () | |
void * | allocate (size_t numBytes) |
void | pop () |
void | popAll () |
void | push () |
Protected Types | |
typedef std::vector< tAllocState > | tAllocStack |
Protected Member Functions | |
void * | initializeAllocation (tHeader *block, unsigned char *memory, size_t numBytes) |
Protected Attributes | |
size_t | alignment |
size_t | alignmentMask |
size_t | currentPageOffset |
tHeader * | freeList |
size_t | headerSkip |
tHeader * | inUseList |
int | numCalls |
size_t | pageSize |
tAllocStack | stack |
size_t | totalBytes |
Friends | |
struct | tHeader |
Definition at line 116 of file PoolAlloc.h.
|
protected |
Definition at line 185 of file PoolAlloc.h.
Definition at line 52 of file PoolAlloc.cpp.
References alignment, alignmentMask, currentPageOffset, headerSkip, pageSize, and tHeader.
TPoolAllocator::~TPoolAllocator | ( | ) |
Definition at line 96 of file PoolAlloc.cpp.
References freeList, inUseList, TPoolAllocator::tHeader::nextPage, and TPoolAllocator::tHeader::~tHeader().
Definition at line 206 of file PoolAlloc.cpp.
References alignmentMask, TAllocation::allocationSize(), currentPageOffset, freeList, headerSkip, initializeAllocation(), inUseList, TPoolAllocator::tHeader::nextPage, numCalls, pageSize, ret, tHeader, and totalBytes.
Referenced by pool_allocator< T >::allocate(), NewPoolTFieldList(), and NewPoolTString().
|
inlineprotected |
Definition at line 188 of file PoolAlloc.h.
References TAllocation::offsetAllocation().
Referenced by allocate().
void TPoolAllocator::pop | ( | ) |
Definition at line 171 of file PoolAlloc.cpp.
References currentPageOffset, freeList, inUseList, TPoolAllocator::tHeader::nextPage, TPoolAllocator::tHeader::pageCount, stack, and TPoolAllocator::tHeader::~tHeader().
Referenced by popAll().
void TPoolAllocator::popAll | ( | ) |
Definition at line 200 of file PoolAlloc.cpp.
Referenced by TShHandleBase::~TShHandleBase().
void TPoolAllocator::push | ( | ) |
Definition at line 152 of file PoolAlloc.cpp.
References currentPageOffset, inUseList, pageSize, and stack.
Referenced by TShHandleBase::TShHandleBase().
|
friend |
Definition at line 156 of file PoolAlloc.h.
Referenced by allocate(), and TPoolAllocator().
|
protected |
Definition at line 198 of file PoolAlloc.h.
Referenced by TPoolAllocator().
|
protected |
Definition at line 200 of file PoolAlloc.h.
Referenced by allocate(), and TPoolAllocator().
|
protected |
Definition at line 204 of file PoolAlloc.h.
Referenced by allocate(), pop(), push(), and TPoolAllocator().
|
protected |
Definition at line 205 of file PoolAlloc.h.
Referenced by allocate(), pop(), and ~TPoolAllocator().
|
protected |
Definition at line 201 of file PoolAlloc.h.
Referenced by allocate(), and TPoolAllocator().
|
protected |
Definition at line 206 of file PoolAlloc.h.
Referenced by allocate(), pop(), push(), and ~TPoolAllocator().
|
protected |
Definition at line 209 of file PoolAlloc.h.
Referenced by allocate().
|
protected |
Definition at line 197 of file PoolAlloc.h.
Referenced by allocate(), push(), and TPoolAllocator().
|
protected |
Definition at line 207 of file PoolAlloc.h.
|
protected |
Definition at line 210 of file PoolAlloc.h.
Referenced by allocate().