9 #ifndef _SQUID_SRC_MEM_ALLOCATORPROXY_H 10 #define _SQUID_SRC_MEM_ALLOCATORPROXY_H 26 #define MEMPROXY_CLASS(CLASS) \ 28 static inline Mem::AllocatorProxy &Pool() { \ 29 static Mem::AllocatorProxy thePool(#CLASS, sizeof(CLASS), false); \ 33 void *operator new(size_t byteCount) { \ 35 assert(byteCount == sizeof(CLASS)); \ 36 return Pool().alloc(); \ 38 void operator delete(void *address) { \ 40 Pool().freeOne(address); \ 42 static int UseCount() { return Pool().inUseCount(); } \ 54 AllocatorProxy(
char const *aLabel,
size_t const &aSize,
bool doZeroBlocks =
true):
AllocatorProxy(char const *aLabel, size_t const &aSize, bool doZeroBlocks=true)
class Ping::pingStats_ stats
size_t objectSize() const
void zeroBlocks(bool doIt)
void freeOne(void *)
Free a element allocated by Mem::AllocatorProxy::alloc()
MemAllocator * theAllocator
char const * objectType() const
MemPoolMeter const & getMeter() const
MemAllocator * getAllocator() const
int getStats(MemPoolStats *stats)
void * alloc()
Allocate one element from the pool.