From: Willy Tarreau Date: Wed, 22 Mar 2023 13:52:30 +0000 (+0100) Subject: MINOR: pools: make sure 'no-memory-trimming' is always used X-Git-Tag: v2.8-dev6~23 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4db0b0430dcd2d0d853b21a10fc85e9c325c3e84;p=thirdparty%2Fhaproxy.git MINOR: pools: make sure 'no-memory-trimming' is always used The global option 'no-memory-trimming' was added in 2.6 with commit c4e56dc58 ("MINOR: pools: add a new global option "no-memory-trimming"") but there were some cases left where it was not considered. Let's make is_trim_enabled() also consider it. --- diff --git a/src/pool.c b/src/pool.c index 214d950fb7..908b3340f5 100644 --- a/src/pool.c +++ b/src/pool.c @@ -213,7 +213,7 @@ static void detect_allocator(void) int is_trim_enabled(void) { - return using_default_allocator; + return !disable_trim && using_default_allocator; } static int mem_should_fail(const struct pool_head *pool)