[Valgrind memory debugger support])
AC_MSG_NOTICE([Valgrind debug support enabled: $with_valgrind_debug])
-dnl Disable "memPools" code
-#AC_ARG_ENABLE(chunkedmempools,
-# AS_HELP_STRING([--enable-chunkedmempools],
-# [Enable experimental chunked memPools. Note that this option
-# simply sets the default behaviour. Specific classes can override this
-# at runtime, and only lib/MemPool.c needs to be altered
-# to change the squid-wide default for all classes.]), [
-#SQUID_YESNO([$enableval],
-# [--enable-chunkedmempools option takes no arguments])
-#])
-SQUID_DEFINE_BOOL(USE_CHUNKEDMEMPOOLS,${enable_chunkedmempools:=no},
- [Enable chunked Memory Pools support (experimental)])
-#AC_MSG_NOTICE([Chunked MemPools enabled: $enable_chunkedmempools])
-
dnl Enable WIN32 Service compile mode
AC_ARG_ENABLE(win32-service,
AS_HELP_STRING([--enable-win32-service],
<tag>--disable-inline</tag>
<p>Removed.
+ <tag>-DUSE_CHUNKEDMEMPOOLS=1</tag>
+ <p>Removed compiler flag. Use run-time environment variable <em>MEMPOOLS=1</em>
+ to enable chunked memory pools instead.
+
</descrip>
return mem_idle_limit;
}
-/* Change the default calue of defaultIsChunked to override
+/* Change the default value of defaultIsChunked to override
* all pools - including those used before main() starts where
* MemPools::GetInstance().setDefaultPoolChunking() can be called.
*/
-MemPools::MemPools() : pools(NULL), mem_idle_limit(2 << 20 /* 2 MB */),
- poolCount(0), defaultIsChunked(USE_CHUNKEDMEMPOOLS && !RUNNING_ON_VALGRIND)
+MemPools::MemPools()
{
- char *cfg = getenv("MEMPOOLS");
- if (cfg)
+ if (char *cfg = getenv("MEMPOOLS"))
defaultIsChunked = atoi(cfg);
}
*/
#include "mem/Meter.h"
-#include "splay.h"
#include "util.h"
#if HAVE_GNUMALLOC_H
void clean(time_t maxage);
void setDefaultPoolChunking(bool const &);
- MemImplementingAllocator *pools;
- ssize_t mem_idle_limit;
- int poolCount;
- bool defaultIsChunked;
+
+ MemImplementingAllocator *pools = nullptr;
+ ssize_t mem_idle_limit = (2 << 20) /* 2MB */;
+ int poolCount = 0;
+ bool defaultIsChunked = false;
};
/**
#define _MEM_POOL_CHUNKED_H_
#include "mem/Pool.h"
+#include "splay.h"
#define MEM_CHUNK_SIZE 4 * 4096 /* 16KB ... 4 * VM_PAGE_SZ */
#define MEM_CHUNK_MAX_SIZE 256 * 1024 /* 2MB */