From: wessels <> Date: Tue, 1 Feb 2000 12:43:02 +0000 (+0000) Subject: DW: X-Git-Tag: SQUID_3_0_PRE1~2067 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=663da80b465f66dc509ead00b19d5d77469841d9;p=thirdparty%2Fsquid.git DW: - Changed storeGetMemSpace so that it doesn't immediately exit if the store is in rebuilding phase. Purging memory objects should be a "light" activity, so there should be no performance penalty. If we don't purge memory objects during the rebuild phase, then memory usage grows without bounds until rebuilding is complete. At high workloads this can cause malloc to fail. --- diff --git a/src/store.cc b/src/store.cc index c4c21d8932..06ee5927f9 100644 --- a/src/store.cc +++ b/src/store.cc @@ -1,6 +1,6 @@ /* - * $Id: store.cc,v 1.513 2000/02/01 05:17:58 wessels Exp $ + * $Id: store.cc,v 1.514 2000/02/01 05:43:02 wessels Exp $ * * DEBUG: section 20 Storage Manager * AUTHOR: Harvest Derived @@ -706,8 +706,6 @@ storeGetMemSpace(int size) pages_needed = (size / SM_PAGE_SIZE) + 1; if (memInUse(MEM_STMEM_BUF) + pages_needed < store_pages_max) return; - if (store_dirs_rebuilding) - return; debug(20, 2) ("storeGetMemSpace: Starting, need %d pages\n", pages_needed); #if HEAP_REPLACEMENT while (heap_nodes(inmem_heap) > 0) {