38 : esize(sz < sizeof(G4PoolLink) ? sizeof(G4PoolLink) : sz)
39 , csize(sz < 1024 / 2 - 16 ? 1024 - 16 : sz * 10 - 16)
49 , chunks(right.chunks)
51 , nchunks(right.nchunks)
64 chunks = right.chunks;
66 nchunks = right.nchunks;
84 G4PoolChunk* n = chunks;
85 G4PoolChunk* p =
nullptr;
101void G4AllocatorPool::Grow()
106 G4PoolChunk* n =
new G4PoolChunk(csize);
111 const int nelem = csize / esize;
112 char* start = n->mem;
113 char* last = &start[(nelem - 1) * esize];
114 for(
char* p = start; p < last; p += esize)
116 reinterpret_cast<G4PoolLink*
>(p)->next =
117 reinterpret_cast<G4PoolLink*
>(p + esize);
119 reinterpret_cast<G4PoolLink*
>(last)->next =
nullptr;
120 head =
reinterpret_cast<G4PoolLink*
>(start);
G4AllocatorPool & operator=(const G4AllocatorPool &right)
G4AllocatorPool(unsigned int n=0)