From: wessels <> Date: Wed, 12 Aug 1998 02:07:03 +0000 (+0000) Subject: Free statCounters memory under PURIFY X-Git-Tag: SQUID_3_0_PRE1~2918 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d2db411c41ce003bc8d06c5ae94a547d7169929f;p=thirdparty%2Fsquid.git Free statCounters memory under PURIFY --- diff --git a/src/main.cc b/src/main.cc index 0bfd6603d0..9acb4e7880 100644 --- a/src/main.cc +++ b/src/main.cc @@ -1,6 +1,6 @@ /* - * $Id: main.cc,v 1.267 1998/08/10 19:37:49 wessels Exp $ + * $Id: main.cc,v 1.268 1998/08/11 20:07:03 wessels Exp $ * * DEBUG: section 1 Startup and Main Loop * AUTHOR: Harvest Derived @@ -712,6 +712,7 @@ SquidShutdown(void *unused) asnFreeMemory(); clientdbFreeMemory(); httpHeaderCleanModule(); + statFreeMemory(); #endif memClean(); #if !XMALLOC_TRACE diff --git a/src/protos.h b/src/protos.h index d4b072dfe9..bf52e3b80a 100644 --- a/src/protos.h +++ b/src/protos.h @@ -1,6 +1,6 @@ /* - * $Id: protos.h,v 1.244 1998/07/31 00:15:51 wessels Exp $ + * $Id: protos.h,v 1.245 1998/08/11 20:07:04 wessels Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -662,6 +662,7 @@ extern void passStart(int, const char *, request_t *, size_t *); extern void identStart(int, ConnStateData *, IDCB * callback, void *); extern void statInit(void); +extern void statFreeMemory(void); extern double median_svc_get(int, int); extern void pconnHistCount(int, int); extern int stat5minClientRequests(void); diff --git a/src/stat.cc b/src/stat.cc index 35d22510c4..418452b67c 100644 --- a/src/stat.cc +++ b/src/stat.cc @@ -1,6 +1,6 @@ /* - * $Id: stat.cc,v 1.274 1998/08/11 19:00:42 wessels Exp $ + * $Id: stat.cc,v 1.275 1998/08/11 20:07:05 wessels Exp $ * * DEBUG: section 18 Cache Manager Statistics * AUTHOR: Harvest Derived @@ -1048,6 +1048,16 @@ statCountersDump(StoreEntry * sentry) tvSubDsec(f->timestamp, current_time)); } +void +statFreeMemory(void) +{ + int i; + for (i = 0; i < N_COUNT_HIST; i++) + statCountersClean(&CountHist[i]); + for (i = 0; i < N_COUNT_HOUR_HIST; i++) + statCountersClean(&CountHourHist[i]); +} + static void statPeerSelect(StoreEntry * sentry) {