From: Willy Tarreau Date: Thu, 8 Dec 2022 16:45:08 +0000 (+0100) Subject: CLEANUP: pools: get rid of CONFIG_HAP_POOLS X-Git-Tag: v2.8-dev1~155 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4da51bd19091df2ad29917f7f4bc567c51cf0d89;p=thirdparty%2Fhaproxy.git CLEANUP: pools: get rid of CONFIG_HAP_POOLS This one was set in defaults.h only when neither DEBUG_NO_POOLS nor DEBUG_UAF were set. This was not the most convenient location to look for it, and it was only used in pool.c to decide on the initial value of POOL_DBG_NO_CACHE. Let's just use DEBUG_NO_POOLS || DEBUG_UAF directly on this flag and get rid of the intermediary condition. This also has the benefit of removing a double inversion, which is always nice for understanding. --- diff --git a/include/haproxy/defaults.h b/include/haproxy/defaults.h index 7b4992822e..b1cfc7c145 100644 --- a/include/haproxy/defaults.h +++ b/include/haproxy/defaults.h @@ -410,13 +410,6 @@ #define DEFAULT_MAXZLIBMEM 0 #endif -/* Pools are always enabled unless explicitly disabled. When disabled, the - * calls are directly passed to the underlying OS functions. - */ -#if !defined(DEBUG_NO_POOLS) && !defined(DEBUG_UAF) -#define CONFIG_HAP_POOLS -#endif - /* On modern architectures with many threads, a fast memory allocator, and * local pools, the global pools with their single list can be way slower than * the standard allocator which already has its own per-thread arenas. In this diff --git a/src/pool.c b/src/pool.c index 8b3324759e..fd40cd87c0 100644 --- a/src/pool.c +++ b/src/pool.c @@ -52,7 +52,7 @@ uint pool_debugging __read_mostly = /* set of POOL_DBG_* flags */ #ifdef CONFIG_HAP_NO_GLOBAL_POOLS POOL_DBG_NO_GLOBAL | #endif -#ifndef CONFIG_HAP_POOLS +#if defined(DEBUG_NO_POOLS) || defined(DEBUG_UAF) POOL_DBG_NO_CACHE | #endif #if defined(DEBUG_POOL_TRACING)