From bf0f0ec4d9bcbda4d1a3c683d981cfc9b5d32223 Mon Sep 17 00:00:00 2001 From: Evan Huus Date: Sun, 11 Aug 2013 23:49:56 +0000 Subject: Reorder and group chunk header flags. Reduces the bit-twiddling needed by the compiler and provides a surprising (if fairly small) performance win. svn path=/trunk/; revision=51305 --- epan/wmem/wmem_allocator_block.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'epan/wmem') diff --git a/epan/wmem/wmem_allocator_block.c b/epan/wmem/wmem_allocator_block.c index f5ac06a33b..379d331037 100644 --- a/epan/wmem/wmem_allocator_block.c +++ b/epan/wmem/wmem_allocator_block.c @@ -165,12 +165,14 @@ typedef struct _wmem_block_hdr_t { * block and the other chunk header fields are irrelevant. */ typedef struct _wmem_block_chunk_t { + guint32 prev; + + /* flags */ + guint32 last:1; guint32 used:1; guint32 jumbo:1; - guint32 prev:30; - guint32 last:1; - guint32 len:31; + guint32 len:29; } wmem_block_chunk_t; /* Handy macros for navigating the chunks in a block as if they were a -- cgit v1.2.3