]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: rousskov
authoramosjeffries <>
Tue, 26 Feb 2008 07:15:55 +0000 (07:15 +0000)
committeramosjeffries <>
Tue, 26 Feb 2008 07:15:55 +0000 (07:15 +0000)
Bug 1933 fix: Fixed memory pools configuration reporting.

We used to report too early, before Squid configuration was parsed.

src/Mem.h
src/main.cc
src/mem.cc

index 22f7d44c7bd478105259bd0c8f9b031c1880b536..22dd10ef1255af828a3e4883f6cbc73b9ab8508f 100644 (file)
--- a/src/Mem.h
+++ b/src/Mem.h
@@ -1,6 +1,6 @@
 
 /*
- * $Id: Mem.h,v 1.4 2006/05/29 00:15:01 robertc Exp $
+ * $Id: Mem.h,v 1.4.4.1 2008/02/26 00:15:55 amosjeffries Exp $
  *
  * DEBUG: section 13    High Level Memory Pool Management
  * AUTHOR: Harvest Derived
@@ -47,6 +47,7 @@ class Mem
 
 public:
     static void Init();
+    static void Report();
     static void RegisterWithCacheManager(CacheManager & manager);
     static void Stats(StoreEntry *);
     static void CleanIdlePools(void *unused);
index de9674a4f6158833017c19f89c79a01495070631..2434181ff08bfc556d12d0d1393ce24cdcd53929 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: main.cc,v 1.451.2.4 2008/02/25 03:01:35 amosjeffries Exp $
+ * $Id: main.cc,v 1.451.2.5 2008/02/26 00:15:55 amosjeffries Exp $
  *
  * DEBUG: section 1     Startup and Main Loop
  * AUTHOR: Harvest Derived
@@ -632,6 +632,7 @@ mainReconfigure(void)
     errorClean();
     enter_suid();              /* root to read config file */
     parseConfigFile(ConfigFile, manager);
+    Mem::Report();
     setEffectiveUser();
     _db_init(Config.Log.log, Config.debugOptions);
     ipcache_restart();         /* clear stuck entries */
@@ -1204,6 +1205,8 @@ main(int argc, char **argv)
 
         parse_err = parseConfigFile(ConfigFile, manager);
 
+        Mem::Report();
+        
         if (opt_parse_cfg_only)
 
             return parse_err;
index 8e253ec7da12b2fa9402ac39ab7b7a9decca6c78..7bc40dc113b71b1a6789b0e2917ef3522ff016c0 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: mem.cc,v 1.106 2007/11/15 16:47:35 wessels Exp $
+ * $Id: mem.cc,v 1.106.2.1 2008/02/26 00:15:55 amosjeffries Exp $
  *
  * DEBUG: section 13    High Level Memory Pool Management
  * AUTHOR: Harvest Derived
@@ -382,8 +382,6 @@ Mem::Init(void)
      * debug messages here at level 0 or 1 will always be printed
      * on stderr.
      */
-    debugs(13, 3, "Memory pools are '" << ((Config.onoff.mem_pools ? "on" : "off"))  << "'; limit: "<<
-            std::setprecision(3) << toMB(MemPools::GetInstance().idleLimit()) << " MB");
 
     /* set all pointers to null */
     memset(MemPools, '\0', sizeof(MemPools));
@@ -430,6 +428,15 @@ Mem::Init(void)
     }
 }
 
+void
+Mem::Report()
+{
+    debugs(13, 3, "Memory pools are '" <<
+        (Config.onoff.mem_pools ? "on" : "off")  << "'; limit: " <<
+        std::setprecision(3) << toMB(MemPools::GetInstance().idleLimit()) <<
+        " MB");
+}
+
 void
 Mem::RegisterWithCacheManager(CacheManager & manager)
 {