]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Free statCounters memory under PURIFY
authorwessels <>
Wed, 12 Aug 1998 02:07:03 +0000 (02:07 +0000)
committerwessels <>
Wed, 12 Aug 1998 02:07:03 +0000 (02:07 +0000)
src/main.cc
src/protos.h
src/stat.cc

index 0bfd6603d05f2fb31d7067d4b0a80b9d49ece76b..9acb4e78805c03f6b7498259e24c0323f1ec0996 100644 (file)
@@ -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
index d4b072dfe9c293acde76483d3b0c824bb9ede933..bf52e3b80a9e6802c0d1ddf1d5fab794eb156a35 100644 (file)
@@ -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);
index 35d22510c48646158dc0bbfc36bdebeec2844e7a..418452b67c0561c670d92a1f6d34a1dca33428ed 100644 (file)
@@ -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)
 {