eo: memory waste at mixin class elaboration

@fix

mixins data offsets are stored in Eo_Extension_Data_Offset[],
if the constructed class is a mixin, do not reserve space for its
private data, the class is in mixins list and will be handled at
Eo_Extension_Data_Offset computation.

see  _eo_data_scope_get(...) for private data retrieval
This commit is contained in:
Jérémy Zurcher 2014-03-05 22:44:21 +01:00
parent 58c5edd9af
commit b763db3666
1 changed files with 3 additions and 2 deletions

View File

@ -940,8 +940,9 @@ eo_class_new(const Eo_Class_Description *desc, const Eo_Class *parent_id, ...)
*(mro_itr) = NULL;
}
size_t extn_data_off = klass->data_offset +
EO_ALIGN_SIZE(klass->desc->data_size);
size_t extn_data_off = klass->data_offset;
if (klass->desc->type != EO_CLASS_TYPE_MIXIN)
extn_data_off += EO_ALIGN_SIZE(klass->desc->data_size);
/* Feed the mixins data offsets and free the mixins list. */
{