diff options
author | Evan Huus <eapache@gmail.com> | 2013-08-11 23:49:56 +0000 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2013-08-11 23:49:56 +0000 |
commit | bf0f0ec4d9bcbda4d1a3c683d981cfc9b5d32223 (patch) | |
tree | 560ebf39e19e42f0963bbc439ab81a39a4fcebc3 /epan/wmem/wmem_allocator_block.c | |
parent | dc46cb0f29c4c8ee8ae1109d4b00fec15a2992ee (diff) | |
download | wireshark-bf0f0ec4d9bcbda4d1a3c683d981cfc9b5d32223.tar.gz wireshark-bf0f0ec4d9bcbda4d1a3c683d981cfc9b5d32223.tar.bz2 wireshark-bf0f0ec4d9bcbda4d1a3c683d981cfc9b5d32223.zip |
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
Diffstat (limited to 'epan/wmem/wmem_allocator_block.c')
-rw-r--r-- | epan/wmem/wmem_allocator_block.c | 8 |
1 files changed, 5 insertions, 3 deletions
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 |