MINOR: pools: report a replaced memory allocator instead of just malloc_trim()
authorWilly Tarreau <w@1wt.eu>
Wed, 22 Mar 2023 17:01:41 +0000 (18:01 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 22 Mar 2023 17:05:02 +0000 (18:05 +0100)
commit1751db140ab609e38af8218efbd23427115a42aa
tree7ebd71f11b6d208681b8c4cb63e6350fc6a7ee5e
parent0c27ec5df73ba89c2c735c2b78cec784022effb6
MINOR: pools: report a replaced memory allocator instead of just malloc_trim()

Instead of reporting the inaccurate "malloc_trim() support" on -vv, let's
report the case where the memory allocator was actively replaced from the
one used at build time, as this is the corner case we want to be cautious
about. We also put a tainted bit when this happens so that it's possible
to detect it at run time (e.g. the user might have inherited it from an
environment variable during a reload operation).

The now unused is_trim_enabled() function was finally dropped.
include/haproxy/bug.h
include/haproxy/pool.h
src/pool.c