55 csize(sz<1024/2-16 ? 1024-16 : sz*10-16),
56 chunks(0), head(0), nchunks(0)
64 : esize(right.esize), csize(right.csize)
74 GaudiUtils::AllocatorPool::operator=
77 if (&right ==
this) {
return *
this; }
80 nchunks = right.nchunks;
128 const int nelem = csize/esize;
130 char* last = &start[(nelem-1)*esize];
131 for (
char* p=start; p<last; p+=esize)
133 reinterpret_cast<PoolLink*
>(p)->next
134 = reinterpret_cast<PoolLink*>(p+esize);
136 reinterpret_cast<PoolLink*
>(last)->next = 0;
void Grow()
Make pool larger.
~AllocatorPool()
Destructor. Return storage to the free store.
void Reset()
Return storage to the free store.
AllocatorPool(unsigned int n=0)
Create a pool of elements of size n.