From: wessels <> Date: Tue, 26 Jun 2001 22:44:24 +0000 (+0000) Subject: Bugzilla #165: "Store Mem Buffer" leaks badly X-Git-Tag: SQUID_3_0_PRE1~1488 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7981509ac6ba50a8bf8f6767d6a640c9dc92c575;p=thirdparty%2Fsquid.git Bugzilla #165: "Store Mem Buffer" leaks badly This fixes some excessive memory usage problems (for uncachable responses only?) when 'maximum_object_size_in_memory' is not set to a small value. It was probably a coding bug from long ago that didn't occur much because 'maximum_object_size_in_memory' used to be hard-coded to a small value (8KB). --- diff --git a/src/store_swapout.cc b/src/store_swapout.cc index 18698ff0fb..52cc167b35 100644 --- a/src/store_swapout.cc +++ b/src/store_swapout.cc @@ -1,6 +1,6 @@ /* - * $Id: store_swapout.cc,v 1.80 2001/03/03 10:39:34 hno Exp $ + * $Id: store_swapout.cc,v 1.81 2001/06/26 16:44:24 wessels Exp $ * * DEBUG: section 20 Storage Manager Swapout Functions * AUTHOR: Duane Wessels @@ -143,7 +143,7 @@ storeSwapOut(StoreEntry * e) */ if (mem->inmem_hi < lowest_offset) new_mem_lo = lowest_offset; - else if (mem->inmem_hi - lowest_offset > Config.Store.maxInMemObjSize) + else if (mem->inmem_hi - mem->inmem_lo > Config.Store.maxInMemObjSize) new_mem_lo = lowest_offset; else new_mem_lo = mem->inmem_lo;