--------------------- PatchSet 2816 Date: 2001/08/23 18:55:10 Author: akroonmaa Branch: chunked_mempools Tag: (none) Log: add mallopt tuning so that chunks are more likely to be alloced by mmap Members: include/MemPool.h:1.1.2.14->1.1.2.15 lib/MemPool.c:1.1.2.19->1.1.2.20 Index: squid/include/MemPool.h =================================================================== RCS file: /cvsroot/squid-sf//squid/include/Attic/MemPool.h,v retrieving revision 1.1.2.14 retrieving revision 1.1.2.15 diff -u -r1.1.2.14 -r1.1.2.15 --- squid/include/MemPool.h 4 May 2001 14:20:14 -0000 1.1.2.14 +++ squid/include/MemPool.h 23 Aug 2001 18:55:10 -0000 1.1.2.15 @@ -8,6 +8,15 @@ #include "splay.h" #include "memMeter.h" +#if HAVE_GNUMALLOC_H +#include +#elif HAVE_MALLOC_H && !defined(_SQUID_FREEBSD_) && !defined(_SQUID_NEXT_) +#include +#endif +#if HAVE_MEMORY_H +#include +#endif + #if PURIFY #define DISABLE_POOLS 1 /* Disabling Memory pools under purify */ #endif Index: squid/lib/MemPool.c =================================================================== RCS file: /cvsroot/squid-sf//squid/lib/Attic/MemPool.c,v retrieving revision 1.1.2.19 retrieving revision 1.1.2.20 diff -u -r1.1.2.19 -r1.1.2.20 --- squid/lib/MemPool.c 4 May 2001 20:38:18 -0000 1.1.2.19 +++ squid/lib/MemPool.c 23 Aug 2001 18:55:11 -0000 1.1.2.20 @@ -81,6 +81,7 @@ */ #define FLUSH_LIMIT 1000 /* Flush memPool counters to memMeters after flush limit calls */ +#define MEM_MAX_MMAP_CHUNKS 2048 #include @@ -333,6 +334,9 @@ memset(&TheMeter, 0, sizeof(TheMeter)); mem_idle_limit = 2 * MB; mempool_initialised = 1; +#if HAVE_MALLOPT + mallopt(M_MMAP_MAX, MEM_MAX_MMAP_CHUNKS); +#endif } void