61 , csize( sz < 1024 / 2 - 16 ? 1024 - 16 : sz * 10 - 16 ) {}
76 if ( &right ==
this ) {
return *
this; }
77 chunks = right.chunks;
79 nchunks = right.nchunks;
121 const int nelem = csize / esize;
122 char*
start =
n->mem.get();
123 char* last = &
start[( nelem - 1 ) * esize];
124 for (
char* p =
start; p < last; p += esize ) {
125 reinterpret_cast<PoolLink*>( p )->next = reinterpret_cast<PoolLink*>( p + esize );
127 reinterpret_cast<PoolLink*>( last )->next =
nullptr;
128 head = reinterpret_cast<PoolLink*>(
start );
void Grow()
Make pool larger.
AllocatorPool & operator=(const AllocatorPool &right)
Private equality operator.
~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.