]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: tools: implement ha_aligned_zalloc()
authorWilly Tarreau <w@1wt.eu>
Mon, 11 Aug 2025 16:46:28 +0000 (18:46 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 11 Aug 2025 17:55:30 +0000 (19:55 +0200)
commit746e77d000d6da9bfbd824c849fc8c4e35ad9a44
tree26110f9070238ddaaad85b41a6809e9da17ed91b
parent55d561042c81f8853364a62b4d5eaba2555c2673
MINOR: tools: implement ha_aligned_zalloc()

This one is exactly ha_aligned_alloc() followed by a memset(0), as
it will be convenient for a number of call places as a replacement
for calloc().

Note that ideally we should also have a calloc version that performs
basic multiply overflow checks, but these are essentially used with
numbers of threads times small structs so that's fine, and we already
do the same everywhere in malloc() calls.
include/haproxy/bug.h
include/haproxy/tools.h