79 const char* a_name =
"unnamed",
81 int a_alignment =
sizeof(
int),
82 bool a_allowUnalignedAlloc =
false);
int m_ptrSize_
Definition: Pool.H:122
void * m_next_
Definition: Pool.H:137
char m_name_[64]
Definition: Pool.H:111
const Pool & operator=(const Pool &a_rhs)
Not implemented. Compiler will not let you copy a Pool.
one dimensional dynamic array
Definition: Vector.H:52
void returnPtr(void *a_ptr)
return memory previous acquired with the getPtr() function.
Vector< char * > m_pool_
Definition: Pool.H:119
friend void dumpmemoryatexit()
static PoolList * m_poolList_
Definition: Pool.H:110
bool m_allowUnalignedAlloc
Definition: Pool.H:130
void * getPtr()
request a section of memory of ptrSize_ contiguous bytes.
int m_alignment_
Definition: Pool.H:128
int m_poolSize_
Definition: Pool.H:125
long memUsage() const
report how much memory this Pool is currently using.
Pool is a class to optimize memory allocation.
Definition: Pool.H:63
std::list< Pool * > PoolList
Definition: Pool.H:20
static void clearAllPools()
Pool(int a_ptrSize, const char *a_name="unnamed", int a_poolSize=100, int a_alignment=sizeof(int), bool a_allowUnalignedAlloc=false)