50 : esize( sz < sizeof(
PoolLink ) ? sizeof(
PoolLink ) : sz ), csize( sz < 1024 / 2 - 16 ? 1024 - 16 : sz * 10 - 16 )
69 if ( &right ==
this ) {
119 char*
start =
n->mem.get();
120 char* last = &start[( nelem - 1 ) *
esize];
121 for (
char* p = start; p < last; p +=
esize ) {
122 reinterpret_cast<PoolLink*
>( p )->next = reinterpret_cast<PoolLink*>( p +
esize );
124 reinterpret_cast<PoolLink*
>( last )->next =
nullptr;
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.