Skip to contentSkip to conversation

Reorganize struct Qcow2Cache for better struct packing

PATCH Applied [email protected] 2 participants 2 messages Jan 27, 2011 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Reorganize struct Qcow2Cache for better struct packing

From: Jes Sorensen <[email protected]>

Move size after the two pointers in struct Qcow2Cache to get better packing of struct elements on 64 bit architectures.

---
 block/qcow2-cache.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
block/qcow2-cache.c +1 -1
index 8f2955b..3824739 100644
@@ -35,9 +35,9 @@ typedef struct Qcow2CachedTable {
 } Qcow2CachedTable;
 
 struct Qcow2Cache {
-    int                     size;
     Qcow2CachedTable*       entries;
     struct Qcow2Cache*      depends;
+    int                     size;
     bool                    depends_on_flush;
     bool                    writethrough;
 };
Signature · 1 line
1.7.3.5