51 , csize( sz < 1024 / 2 - 16 ? 1024 - 16 : sz * 10 - 16 ) {}
66 if ( &right ==
this ) {
return *
this; }
67 chunks = right.chunks;
69 nchunks = right.nchunks;
111 const int nelem = csize / esize;
112 char*
start =
n->mem.get();
113 char* last = &
start[( nelem - 1 ) * esize];
114 for (
char* p =
start; p < last; p += esize ) {
115 reinterpret_cast<PoolLink*>( p )->next = reinterpret_cast<PoolLink*>( p + esize );
117 reinterpret_cast<PoolLink*>( last )->next =
nullptr;
118 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.