]> git.ipfire.org Git - thirdparty/haproxy.git/commit
DIET/MINOR: listener: rearrange a few fields in struct listener to save 16 bytes
authorWilly Tarreau <w@1wt.eu>
Fri, 6 Dec 2013 20:18:49 +0000 (21:18 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 9 Dec 2013 15:06:21 +0000 (16:06 +0100)
commitf6502c5062334b3b10a31b6056af8a9b9e0e92ff
tree0436c4efcebe2c78ec4d4503d09d982c0982d610
parentad5281ca0429c2398022a5eb9109e4c79c7f1ed0
DIET/MINOR: listener: rearrange a few fields in struct listener to save 16 bytes

Pack the listener state to 1 char, store it as an enum instead of an
int (more gdb-friendly), and move a few fields around to fill holes.

The <nice> field can only be -1024..1024 so it was stored as a signed
short and completes well with obj_type and li_state.

Doing this has reduced the struct listener from 376 to 360 bytes (4.2%).
include/types/listener.h