]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: activity/memprofile: monitor non-portable calls as well
authorWilly Tarreau <w@1wt.eu>
Thu, 21 Nov 2024 08:12:58 +0000 (09:12 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 21 Nov 2024 18:58:06 +0000 (19:58 +0100)
commit5ddc8b3ad4190583aa6f0996a7401d6f2d4fe78e
tree7ec3b489ff8ecd84863bac87814179c28a26f7e1
parent33c0ce299da0a56a01ec1f59ebc78e8d59081acc
MINOR: activity/memprofile: monitor non-portable calls as well

Some dependencies might very well rely on posix_memalign(), strndup()
or other less portable callsn making us miss them when chasing memory
leaks, resulting in negative global allocation counters. Let's provide
the handlers for the following functions:

  strndup()        // _POSIX_C_SOURCE >= 200809L || glibc >= 2.10
  valloc()         // _BSD_SOURCE || _XOPEN_SOURCE>=500 || glibc >= 2.12
  aligned_alloc()  // _ISOC11_SOURCE
  posix_memalign() // _POSIX_C_SOURCE >= 200112L
  memalign()       // obsolete
  pvalloc()        // obsolete

This time we don't fail if they're not found, we just silently forward
the calls.
include/haproxy/activity-t.h
src/activity.c