]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: backend: move all LB algo parameters into an union
authorWilly Tarreau <w@1wt.eu>
Mon, 14 Jan 2019 15:55:42 +0000 (16:55 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 14 Jan 2019 18:33:17 +0000 (19:33 +0100)
commit0cac26cd8841491ab205357d4a7248a6e2d44e08
tree42e970edce8b5604eb96c4d835648f05f52899cb
parent76e84f50919be89d8c7c0af4e9dd2be95cf45036
MEDIUM: backend: move all LB algo parameters into an union

Since all of them are exclusive, let's move them to an union instead
of eating memory with the sum of all of them. We're using a transparent
union to limit the code changes.

Doing so reduces the struct lbprm from 392 bytes to 372, and thanks
to these changes, the struct proxy is now down to 6480 bytes vs 6624
before the changes (144 bytes saved per proxy).
include/types/backend.h
src/haproxy.c