From: adrian <> Date: Sat, 6 Apr 2002 15:57:54 +0000 (+0000) Subject: Don't try to spit out the 'unallocated' stuff unless you've got the X-Git-Tag: SQUID_3_0_PRE1~1125 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1ce8e2040b3cc2dfd724e899d52a0353f5e6050d;p=thirdparty%2Fsquid.git 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.. --- 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",