]> git.kaiwu.me - haproxy.git/commit
CLEANUP: sample: reduce struct sample by filling a hole
authorWilly Tarreau <w@1wt.eu>
Mon, 30 Nov 2026 18:55:00 +0000 (19:55 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 1 Dec 2026 07:17:13 +0000 (08:17 +0100)
commit86f7020d1caf9b4e3eff892d0bd875fe101cf263
treeef55cee414b13c2ca2365355e650f5f6b649ff15
parent7876d3e0ba348f8d394972924441a724d06abfda
CLEANUP: sample: reduce struct sample by filling a hole

The struct sample keeps a 32-bit hole at the beggining after the flags,
and ends up with a 32-bit member (opt) that imposes extra padding.
Let's just move opt into the hole and reduce it from 152 to 144 bytes.
That counts more than it seems because a lot of expression processing
creates copies of samples or memset() them (e.g. in every pattern match
in ACLs).
include/haproxy/sample-t.h