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
This commit is contained in:
Evan Huus 2013-08-11 23:49:56 +00:00
parent dc46cb0f29
commit bf0f0ec4d9
1 changed files with 5 additions and 3 deletions

View File

@ -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