From: Willy Tarreau Date: Thu, 24 Oct 2024 12:36:30 +0000 (+0200) Subject: MINOR: pools: export the pools variable X-Git-Tag: v3.1-dev11~53 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fba48e1c40287f1abb4066935f2436bd0b8cd7a4;p=thirdparty%2Fhaproxy.git MINOR: pools: export the pools variable We want it to be accessible from debuggers for inspection and it's currently unavailable. Let's start by exporting it as a first step. --- diff --git a/include/haproxy/pool.h b/include/haproxy/pool.h index 66ad2927ed..c608694755 100644 --- a/include/haproxy/pool.h +++ b/include/haproxy/pool.h @@ -106,6 +106,9 @@ extern int pool_trim_in_progress; /* set of POOL_DBG_* flags */ extern uint pool_debugging; +/* pools are listed here */ +extern struct list pools; + int malloc_trim(size_t pad); void trim_all_pools(void); diff --git a/src/pool.c b/src/pool.c index 7caed7bf6b..31c5c22510 100644 --- a/src/pool.c +++ b/src/pool.c @@ -36,7 +36,7 @@ THREAD_LOCAL size_t pool_cache_bytes = 0; /* total cache size */ THREAD_LOCAL size_t pool_cache_count = 0; /* #cache objects */ -static struct list pools __read_mostly = LIST_HEAD_INIT(pools); +struct list pools __read_mostly = LIST_HEAD_INIT(pools); int mem_poison_byte __read_mostly = 'P'; int pool_trim_in_progress = 0; uint pool_debugging __read_mostly = /* set of POOL_DBG_* flags */