aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2013-06-10 16:19:43 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2013-06-10 16:42:15 +0200
commit1f7ae48215168724d35e6c8076eba39eef47ee72 (patch)
tree58b4f0ad1a1a6e35d3436172b1e51b8f14aa3087
parenteo: fix advertised object size in dbg msg (diff)
downloadefl-1f7ae48215168724d35e6c8076eba39eef47ee72.tar.gz
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
-rw-r--r--src/lib/eo/eo.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index 737ab9b079..0f2c65422a 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -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);