mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-01 09:01:03 +01:00
We have two versions, _safe() which verifies and adjusts alignment, and the regular one which trusts the caller. There's also a dedicated ha_aligned_free() due to mingw. The currently detected OSes are mingw, unixes older than POSIX 200112 which require memalign(), and those post 200112 which will use posix_memalign(). Solaris 10 reports 200112 (probably through _GNU_SOURCE since it does not do it by default), and Solaris 11 still supports memalign() so for all Solaris we use memalign(). The memstats wrappers are also implemented, and have the exported names. This was the opportunity for providing a separate free call that lets the caller specify the size (e.g. for use with pools). For now this code is not used.