about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2013-04-20 22:59:32 +0000
committerEric Wong <normalperson@yhbt.net>2013-04-20 22:59:32 +0000
commit241cfdd395c7d045f0048a1a0410ae28e6555c3b (patch)
treefa77b0cf1a3a2c7a87b60b9dfbaea1f74aa5e35c
parent6601f1ab43e90391932ad133335c814980bf7428 (diff)
downloadraindrops-241cfdd395c7d045f0048a1a0410ae28e6555c3b.tar.gz
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
-rw-r--r--ext/raindrops/linux_inet_diag.c4
1 files 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) + \