]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Clear all pools on free. Don't assume pools having an even size (in KB) is
authorhno <>
Tue, 16 Apr 2002 06:33:29 +0000 (06:33 +0000)
committerhno <>
Tue, 16 Apr 2002 06:33:29 +0000 (06:33 +0000)
plain buffers.

lib/MemPool.c

index a58c8bd134f3dceb3624e1704e0762c40443cd49..f2e5d74eb0023d6d823fc1d2a1028eec88416981 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: MemPool.c,v 1.10 2002/04/08 10:17:11 hno Exp $
+ * $Id: MemPool.c,v 1.11 2002/04/16 00:33:29 hno Exp $
  *
  * DEBUG: section 63    Low Level Memory Pool Management
  * AUTHOR: Alex Rousskov, Andres Kroonmaa
@@ -249,7 +249,11 @@ static void
 memPoolPush(MemPool * pool, void *obj)
 {
     void **Free;
-    if ((pool->obj_size % 2048) != 0)
+    /* XXX We should figure out a sane way of avoiding having to clear
+     * all buffers. For example data buffers such as used by MemBuf do
+     * not really need to be cleared.. There was a condition based on
+     * the object size here, but such condition is not safe.
+     */
        memset(obj, 0, pool->obj_size);
     Free = obj;
     *Free = pool->freeCache;