diff --git a/include/haproxy/pool.h b/include/haproxy/pool.h index 9f8658d54..2c3c7db55 100644 --- a/include/haproxy/pool.h +++ b/include/haproxy/pool.h @@ -111,6 +111,9 @@ /* poison each newly allocated area with this byte if >= 0 */ extern int mem_poison_byte; +/* set of POOL_DBG_* flags */ +extern uint pool_debugging; + void *pool_get_from_os(struct pool_head *pool); void pool_put_to_os(struct pool_head *pool, void *ptr); void *pool_alloc_nocache(struct pool_head *pool); diff --git a/src/pool.c b/src/pool.c index aca28efdc..8462accd0 100644 --- a/src/pool.c +++ b/src/pool.c @@ -37,6 +37,7 @@ THREAD_LOCAL size_t pool_cache_count = 0; /* #cache objects */ static struct list pools __read_mostly = LIST_HEAD_INIT(pools); int mem_poison_byte __read_mostly = -1; +uint pool_debugging __read_mostly = 0; /* set of POOL_DBG_* flags */ #ifdef DEBUG_FAIL_ALLOC static int mem_fail_rate __read_mostly = 0;