]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: tools: also implement ha_aligned_alloc_typed()
authorWilly Tarreau <w@1wt.eu>
Wed, 13 Aug 2025 15:11:32 +0000 (17:11 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 13 Aug 2025 15:37:08 +0000 (17:37 +0200)
commit33d72568dd40fb3c3344ab4273e5e8f10ac73774
tree6406e13862e7ce4a72ea1fb1901053503cf7eb38
parent9432e7d6887ade0db69947f343c5b5535a33e303
MINOR: tools: also implement ha_aligned_alloc_typed()

This one is a macro and will allocate a properly aligned and sized
object. This will help make sure that the alignment promised to the
compiler is respected.

When memstats is used, the type name is passed as a string into the
.extra field so that it can be displayed in "debug dev memstats". Two
tiny mistakes related to memstats macros were also fixed (calloc
instead of malloc for zalloc), and the doc was also added to document
how to use these calls.
doc/internals/api/memory.txt [new file with mode: 0644]
include/haproxy/bug.h
src/debug.c