From c39333a2c6c007689c0f9a986dd060c2ff370c13 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Tue, 24 Jan 2012 15:55:27 +0000 Subject: [PATCH] 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. Reviewed-by: Robert Bragg --- cogl/cogl-object-private.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cogl/cogl-object-private.h b/cogl/cogl-object-private.h index e4c450e46..52fa9561c 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