48 #ifndef GAUDIKERNEL_AllocatorPool_h
49 #define GAUDIKERNEL_AllocatorPool_h 1
52 #include "GaudiKernel/Kernel.h"
68 explicit AllocatorPool(
unsigned int n=0 );
72 AllocatorPool(
const AllocatorPool& right);
76 inline void Free(
void* b );
78 inline unsigned int Size()
const;
85 AllocatorPool& operator= (
const AllocatorPool& right);
91 PoolLink* next =
nullptr;
96 explicit PoolChunk(
unsigned int sz)
97 : size(sz), mem{
new char[size]} {}
98 const unsigned int size;
99 std::unique_ptr<char[]> mem;
100 PoolChunk* next =
nullptr;
108 const unsigned int esize;
109 const unsigned int csize;
110 PoolChunk* chunks =
nullptr;
111 PoolLink* head =
nullptr;
139 PoolLink* p =
static_cast<PoolLink*
>(b);
151 return nchunks*csize;
void Grow()
Make pool larger.
unsigned int Size() const
Return storage size.
void * Alloc()
Allocate one element.
void Free(void *b)
Return an element back to the pool.
Forward declarations for the functions in SerializeSTL.h.