]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bugzilla #165: "Store Mem Buffer" leaks badly
authorwessels <>
Tue, 26 Jun 2001 22:44:24 +0000 (22:44 +0000)
committerwessels <>
Tue, 26 Jun 2001 22:44:24 +0000 (22:44 +0000)
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).

src/store_swapout.cc

index 18698ff0fbdc62f498bde462203dbb7589378958..52cc167b352f600136017050cbb2aac06cfe8afc 100644 (file)
@@ -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;