From f83ece44f64b2b9d4fea8baf42c9a78db7797210 Mon Sep 17 00:00:00 2001 From: cedric Date: Sun, 21 Nov 2010 10:54:26 +0000 Subject: [PATCH] * eina: use available mempool. Patch from the OpenBSD team : Fabien Romano Jonathan Armani git-svn-id: http://svn.enlightenment.org/svn/e/trunk/eina@54759 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/eina_quadtree.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/lib/eina_quadtree.c b/src/lib/eina_quadtree.c index 251bb96..d6ff14e 100644 --- a/src/lib/eina_quadtree.c +++ b/src/lib/eina_quadtree.c @@ -882,6 +882,8 @@ eina_quadtree_increase(Eina_QuadTree_Item *object) Eina_Bool eina_quadtree_init(void) { + const char *choice, *tmp; + _eina_log_qd_dom = eina_log_domain_register("eina_quadtree", EINA_LOG_COLOR_DEFAULT); if (_eina_log_qd_dom < 0) @@ -896,9 +898,18 @@ eina_quadtree_init(void) EMS(EINA_MAGIC_QUADTREE_ITEM); #undef EMS - items_mp = eina_mempool_add("chained_mempool", "QuadTree Item", NULL, +#ifdef EINA_DEFAULT_MEMPOOL + choice = "pass_through"; +#else + choice = "chained_mempool"; +#endif + tmp = getenv("EINA_MEMPOOL"); + if (tmp && tmp[0]) + choice = tmp; + + items_mp = eina_mempool_add(choice, "QuadTree Item", NULL, sizeof (Eina_QuadTree_Item), 320); - root_mp = eina_mempool_add("chained_mempool", "QuadTree Root", NULL, + root_mp = eina_mempool_add(choice, "QuadTree Root", NULL, sizeof (Eina_QuadTree_Root), 32); return EINA_TRUE; -- 2.7.4