forked from enlightenment/efl
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:
parent
58c5edd9af
commit
b763db3666
|
@ -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. */
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue