[cogl/wip/unref-virtual: 1/4] object: Reorder the CoglObject members by size



commit 8570c9008fb11c5b1138bc81853c111914e67089
Author: Neil Roberts <neil linux intel com>
Date:   Tue Jan 24 15:55:27 2012 +0000

    object: Reorder the CoglObject members by size
    
    This moves the pointer members of CoglObject to the top and the int
    members to the bottom so that there won't be any padding inserted on
    64-bit machines. This reduces the size of the struct from 80 bytes to
    72.

 cogl/cogl-object-private.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/cogl/cogl-object-private.h b/cogl/cogl-object-private.h
index e4c450e..52fa956 100644
--- a/cogl/cogl-object-private.h
+++ b/cogl/cogl-object-private.h
@@ -73,14 +73,14 @@ typedef struct
  */
 struct _CoglObject
 {
-  unsigned int      ref_count;
+  CoglObjectClass  *klass;
 
   CoglUserDataEntry user_data_entry[
     COGL_OBJECT_N_PRE_ALLOCATED_USER_DATA_ENTRIES];
   GArray           *user_data_array;
   int               n_user_data_entries;
 
-  CoglObjectClass  *klass;
+  unsigned int      ref_count;
 };
 
 /* Helper macro to encapsulate the common code for COGL reference



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]