]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/mem/AllocatorProxy.cc
2 * Copyright (C) 1996-2016 The Squid Software Foundation and contributors
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
10 #include "mem/AllocatorProxy.h"
14 Mem::AllocatorProxy::alloc()
16 return getAllocator()->alloc();
20 Mem::AllocatorProxy::freeOne(void *address
)
22 getAllocator()->freeOne(address
);
23 /* TODO: check for empty, and if so, if the default type has altered,
29 Mem::AllocatorProxy::getAllocator() const
32 theAllocator
= MemPools::GetInstance().create(objectType(), size
);
33 theAllocator
->zeroBlocks(doZero
);
39 Mem::AllocatorProxy::inUseCount() const
44 return theAllocator
->inUseCount();
48 Mem::AllocatorProxy::zeroBlocks(bool doIt
)
50 getAllocator()->zeroBlocks(doIt
);
54 Mem::AllocatorProxy::getMeter() const
56 return getAllocator()->getMeter();
60 Mem::AllocatorProxy::getStats(MemPoolStats
* stats
)
62 return getAllocator()->getStats(stats
);