]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: activity/memprofile: offer a function to unregister stale info
authorWilly Tarreau <w@1wt.eu>
Thu, 21 Nov 2024 10:27:52 +0000 (11:27 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 21 Nov 2024 18:58:06 +0000 (19:58 +0100)
commit859341c1ec583c586ef36db0b63cd84f3843bfab
tree3c7c6d1633fe15e98c6230deacefe17f88504bcd
parentc42a2b8c945d1b45672a2b1715dfa586daaec657
MINOR: activity/memprofile: offer a function to unregister stale info

There's actually a problem with memprofiles: the pool pointer is stored
in ->info but some pools are replaced during startup, such as the trash
pool, leaving a dangling pointer there.

Let's complete the API with a new function memprof_remove_stale_info()
that will remove all stale references to this info pointer. It's also
present when USE_MEMORY_PROFILING is not set so as to ease the job on
callers.
include/haproxy/activity.h
src/activity.c