summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric Bail <cedric.bail@samsung.com>2013-11-29 15:32:27 +0900
committerCedric Bail <cedric.bail@samsung.com>2013-11-29 15:33:51 +0900
commit4f33c81bdbf94cf15b7cf56fcb05b849f8f99581 (patch)
tree3cd174b4a7913e05905af8ffe8848e4ca27513f6
parentaefd608453c47ff03d60d1a34f0aba73ad290016 (diff)
downloadefl-4f33c81bdbf94cf15b7cf56fcb05b849f8f99581.tar.gz
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.
-rw-r--r--src/lib/evas/canvas/evas_main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c
index 185b4a539e..e3f520bf1f 100644
--- a/src/lib/evas/canvas/evas_main.c
+++ b/src/lib/evas/canvas/evas_main.c
@@ -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);