From: Amos Jeffries Date: Tue, 29 Mar 2016 08:00:44 +0000 (+1300) Subject: Remove memPoolInUseCount() wrapper X-Git-Tag: SQUID_4_0_8~7^2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e8dcf3122567ab29bce060c78262bd7d4068ea24;p=thirdparty%2Fsquid.git Remove memPoolInUseCount() wrapper --- diff --git a/src/mem/AllocatorProxy.cc b/src/mem/AllocatorProxy.cc index 9df8e83664..9d5f7dcae4 100644 --- a/src/mem/AllocatorProxy.cc +++ b/src/mem/AllocatorProxy.cc @@ -41,7 +41,7 @@ Mem::AllocatorProxy::inUseCount() const if (!theAllocator) return 0; else - return memPoolInUseCount(theAllocator); + return theAllocator->inUseCount(); } void diff --git a/src/mem/Pool.cc b/src/mem/Pool.cc index 4db5fe7841..42e2e9b1b5 100644 --- a/src/mem/Pool.cc +++ b/src/mem/Pool.cc @@ -300,12 +300,6 @@ size_t MemAllocator::RoundedSize(size_t s) return ((s + sizeof(void*) - 1) / sizeof(void*)) * sizeof(void*); } -int -memPoolInUseCount(MemAllocator * pool) -{ - return pool->inUseCount(); -} - int memPoolsTotalAllocated(void) { diff --git a/src/mem/Pool.h b/src/mem/Pool.h index 8bcfd213c2..46ffb4d1c1 100644 --- a/src/mem/Pool.h +++ b/src/mem/Pool.h @@ -355,8 +355,6 @@ extern void memPoolIterateDone(MemPoolIterator ** iter); */ extern int memPoolGetGlobalStats(MemPoolGlobalStats * stats); -/// \ingroup MemPoolsAPI -extern int memPoolInUseCount(MemAllocator *); /// \ingroup MemPoolsAPI extern int memPoolsTotalAllocated(void); diff --git a/src/mem/old_api.cc b/src/mem/old_api.cc index 40c0d0b0af..9ccf60220c 100644 --- a/src/mem/old_api.cc +++ b/src/mem/old_api.cc @@ -257,7 +257,7 @@ memStringCount() size_t result = 0; for (int counter = 0; counter < mem_str_pool_count; ++counter) - result += memPoolInUseCount(GetStrPool(counter)); + result += GetStrPool(counter)->inUseCount(); return result; } @@ -513,7 +513,7 @@ memClean(void) int memInUse(mem_type type) { - return memPoolInUseCount(GetPool(type)); + return GetPool(type)->inUseCount(); } /* ick */ diff --git a/src/tests/stub_libmem.cc b/src/tests/stub_libmem.cc index f6a4a12ab1..cb2c6efc89 100644 --- a/src/tests/stub_libmem.cc +++ b/src/tests/stub_libmem.cc @@ -105,6 +105,5 @@ MemPoolIterator * memPoolIterate(void) STUB_RETVAL(NULL) MemImplementingAllocator * memPoolIterateNext(MemPoolIterator * iter) STUB_RETVAL(NULL) void memPoolIterateDone(MemPoolIterator ** iter) STUB int memPoolGetGlobalStats(MemPoolGlobalStats * stats) STUB_RETVAL(0) -int memPoolInUseCount(MemAllocator *) STUB_RETVAL(0) int memPoolsTotalAllocated(void) STUB_RETVAL(0)