evas: roundup the step size of an array to fit in one page of memory.

This make an array stay in 4K instead of 20K before. It should reduce a little
bit our peak memory usage without slowing down things to much.
This commit is contained in:
Cedric Bail 2013-11-29 15:32:27 +09:00
parent aefd608453
commit 4f33c81bdb
1 changed files with 2 additions and 1 deletions

View File

@ -170,7 +170,8 @@ _constructor(Eo *eo_obj, void *class_data, va_list *list EINA_UNUSED)
eina_clist_init(&e->calc_done);
#define EVAS_ARRAY_SET(E, Array) \
eina_array_step_set(&E->Array, sizeof (E->Array), 4096);
eina_array_step_set(&E->Array, sizeof (E->Array), \
((1024 * sizeof (void*)) - sizeof (E->Array)) / sizeof (void*));
EVAS_ARRAY_SET(e, delete_objects);
EVAS_ARRAY_SET(e, active_objects);