From: wessels <> Date: Sat, 7 Dec 1996 06:27:49 +0000 (+0000) Subject: need store_pages_max since sm_stats.max_pages == 0 with PURIFY=1 X-Git-Tag: SQUID_3_0_PRE1~5307 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=13c72789eac137afa3729c2c4e47d4c25f8e9f46;p=thirdparty%2Fsquid.git need store_pages_max since sm_stats.max_pages == 0 with PURIFY=1 --- diff --git a/src/store.cc b/src/store.cc index 8d701b9e41..9896117b47 100644 --- a/src/store.cc +++ b/src/store.cc @@ -1,6 +1,6 @@ /* - * $Id: store.cc,v 1.177 1996/12/06 21:49:36 wessels Exp $ + * $Id: store.cc,v 1.178 1996/12/06 23:27:49 wessels Exp $ * * DEBUG: section 20 Storeage Manager * AUTHOR: Harvest Derived @@ -250,6 +250,7 @@ static HashID in_mem_table = 0; /* current memory storage size */ unsigned long store_mem_size = 0; +static int store_pages_max = 0; static int store_pages_high = 0; static int store_pages_low = 0; @@ -1825,10 +1826,10 @@ storeGetMemSpace(int size) } i = 3; - if (sm_stats.n_pages_in_use > sm_stats.max_pages) { + if (sm_stats.n_pages_in_use > store_pages_max) { if (squid_curtime - last_warning > 600) { debug(20, 0, "WARNING: Exceeded 'cache_mem' size (%dK > %dK)\n", - sm_stats.n_pages_in_use * 4, sm_stats.max_pages * 4); + sm_stats.n_pages_in_use * 4, store_pages_max * 4); last_warning = squid_curtime; debug(20, 0, "Perhaps you should increase cache_mem?\n"); i = 0; @@ -2454,6 +2455,7 @@ storeConfigure(void) store_swap_low = (long) (((float) Config.Swap.maxSize * (float) Config.Swap.lowWaterMark) / (float) 100); + store_pages_max = Config.Mem.maxSize / SM_PAGE_SIZE; store_pages_high = store_mem_high / SM_PAGE_SIZE; store_pages_low = store_mem_low / SM_PAGE_SIZE; }