38: esize((sz < sizeof(PoolLink)) ? sizeof(PoolLink) : sz)
39, csize((sz < 1024 / 2 - 16) ? (1024 - 16) : (sz * 10 - 16))
54, nchunks(right.nchunks)
66 chunks = right.chunks;
68 nchunks = right.nchunks;
87 PoolChunk* n = chunks;
88 PoolChunk* p =
nullptr;
105TaskAllocatorPool::Grow()
110 PoolChunk* n =
new PoolChunk(csize);
115 const int nelem = csize / esize;
116 char* start = n->mem;
117 char* last = &start[(nelem - 1) * esize];
118 for(
char* p = start; p < last; p += esize)
120 reinterpret_cast<PoolLink*
>(p)->next =
reinterpret_cast<PoolLink*
>(p + esize);
122 reinterpret_cast<PoolLink*
>(last)->next =
nullptr;
123 head =
reinterpret_cast<PoolLink*
>(start);
TaskAllocatorPool(unsigned int n=0)