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.
void * getPtr()
request a section of memory of ptrSize_ contiguous bytes.
Definition: Pool.H:157
std::vector< char * > m_pool_
Definition: Pool.H:119
void returnPtr(void *a_ptr)
return memory previous acquired with the getPtr() function.
friend void dumpmemoryatexit()
static PoolList * m_poolList_
Definition: Pool.H:110
bool m_allowUnalignedAlloc
Definition: Pool.H:130
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)