From 241cfdd395c7d045f0048a1a0410ae28e6555c3b Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 20 Apr 2013 22:59:32 +0000 Subject: [PATCH] linux_inet_diag: better align listener_stats struct Using an extra 4 bytes for the listener_stats should not significantly increase space usage, and it has the side benefit of making our code slightly smaller. $ ~/linux/scripts/bloat-o-meter before.so after.so add/remove: 0/0 grow/shrink: 1/2 up/down: 14/-32 (-18) function old new delta tcp_stats 392 406 +14 st_to_hash 195 187 -8 diag 763 739 -24 --- ext/raindrops/linux_inet_diag.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/raindrops/linux_inet_diag.c b/ext/raindrops/linux_inet_diag.c index d94dafd..dcf7bc2 100644 --- a/ext/raindrops/linux_inet_diag.c +++ b/ext/raindrops/linux_inet_diag.c @@ -70,8 +70,8 @@ static ID id_new; struct listen_stats { uint32_t active; - uint32_t listener_p:1; - uint32_t queued:31; + uint32_t queued; + uint32_t listener_p; }; #define OPLEN (sizeof(struct inet_diag_bc_op) + \ -- 2.11.4.GIT