eo_class_new: fix big memory waste

extn_data_size is not equal to extn_data_off,
current class data size and data offset must be substracted first

elementary_test bubble peak usage goes from 13.7 MiB to 12.5 MiB
This commit is contained in:
Jérémy Zurcher 2013-06-10 16:19:43 +02:00
parent 4e742bf0bf
commit 1f7ae48215
1 changed files with 2 additions and 1 deletions

View File

@ -1005,7 +1005,8 @@ eo_class_new(const Eo_Class_Description *desc, const Eo_Class *parent_id, ...)
mro_itr++;
}
klass->extn_data_size = extn_data_off;
klass->extn_data_size = extn_data_off
- klass->data_offset - EO_ALIGN_SIZE(klass->desc->data_size);
}
eina_lock_take(&_eo_class_creation_lock);