From 1ce8e2040b3cc2dfd724e899d52a0353f5e6050d Mon Sep 17 00:00:00 2001 From: adrian <> Date: Sat, 6 Apr 2002 15:57:54 +0000 Subject: [PATCH] Don't try to spit out the 'unallocated' stuff unless you've got the right set of compile time flags. The code didn't compile under BSD which doesn't have mallinfo() or whatever it needs.. --- src/stat.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/stat.cc b/src/stat.cc index 8926dc8763..923199abd1 100644 --- a/src/stat.cc +++ b/src/stat.cc @@ -1,6 +1,6 @@ /* - * $Id: stat.cc,v 1.354 2002/04/06 08:49:27 adrian Exp $ + * $Id: stat.cc,v 1.355 2002/04/06 08:57:54 adrian Exp $ * * DEBUG: section 18 Cache Manager Statistics * AUTHOR: Harvest Derived @@ -602,10 +602,12 @@ info_get(StoreEntry * sentry) { MemPoolGlobalStats mp_stats; memPoolGetGlobalStats(&mp_stats); +#if !(HAVE_MSTATS && HAVE_GNUMALLOC_H) && HAVE_MALLINFO && HAVE_STRUCT_MALLINFO storeAppendPrintf(sentry, "\tmemPool accounted: %6d KB %3d%%\n", mp_stats.TheMeter->alloc.level >> 10, percent(mp_stats.TheMeter->alloc.level, t)); storeAppendPrintf(sentry, "\tmemPool unaccounted: %6d KB %3d%%\n", (t - mp_stats.TheMeter->alloc.level) >> 10, percent((t - mp_stats.TheMeter->alloc.level), t)); +#endif storeAppendPrintf(sentry, "\tmemPoolAlloc calls: %9.0f\n", mp_stats.TheMeter->gb_saved.count); storeAppendPrintf(sentry, "\tmemPoolFree calls: %9.0f\n", -- 2.47.3