]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: config: round up global.tune.bufsize to the next multiple of 2 void*
authorWilly Tarreau <w@1wt.eu>
Wed, 12 Dec 2018 05:19:42 +0000 (06:19 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 12 Dec 2018 05:19:42 +0000 (06:19 +0100)
commitc77d364905bc02b02c3dd70fb397ceba2084c7d4
treef7a238f5987974945563da3d6f5c75b3a1e1e9c0
parent3815b227fe5e820f1539ecce034937c50f1c2cda
MINOR: config: round up global.tune.bufsize to the next multiple of 2 void*

Since HTX casts the buffer to a struct and stores relative pointers at the
end, it is mandatory that its end is properly aligned. This patch enforces
a buffer size rounding up to the next multiple of two void*, thus 8 on
32-bit and 16 on 64-bit, to match what malloc() already does on the beginning
of the buffer. In pratice it will never be really noticeable since default
sizes already are such multiples.
doc/configuration.txt
src/cfgparse-global.c
src/haproxy.c