9 #include <stk_util/util/Pool.hpp> 14 Pool::Pool(
unsigned int sz)
16 esize(sz<sizeof(Link) ? sizeof(Link) : sz),
40 const int nelem = Chunk::size/esize;
42 char* last = &start[ (nelem-1)*esize ];
43 for(
char* p=start; p<last; p+=esize) {
44 reinterpret_cast<Link*
>(p)->next = reinterpret_cast<Link*>(p+esize);
46 reinterpret_cast<Link*
>(last)->next = NULL;
47 head =
reinterpret_cast<Link*
>(start);