From: amosjeffries <> Date: Tue, 26 Feb 2008 07:15:55 +0000 (+0000) Subject: Author: rousskov X-Git-Tag: SQUID_3_0_STABLE2~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=82015610120112ff15a17d4b5b307d4a1c2e53b6;p=thirdparty%2Fsquid.git Author: rousskov Bug 1933 fix: Fixed memory pools configuration reporting. We used to report too early, before Squid configuration was parsed. --- diff --git a/src/Mem.h b/src/Mem.h index 22f7d44c7b..22dd10ef12 100644 --- 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); diff --git a/src/main.cc b/src/main.cc index de9674a4f6..2434181ff0 100644 --- a/src/main.cc +++ b/src/main.cc @@ -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; diff --git a/src/mem.cc b/src/mem.cc index 8e253ec7da..7bc40dc113 100644 --- a/src/mem.cc +++ b/src/mem.cc @@ -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) {