From da127a69d0351011e876ba201dd4c6c471469e7a Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 5 Feb 2016 14:34:29 -0500 Subject: [PATCH] evas: check EINA_MEMPOOL env var when creating evas mempool allocators this should really be a utility function already since all mempools in efl use the exact same code... --- src/lib/evas/include/evas_private.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h index 91cdbe7..de135e0 100644 --- a/src/lib/evas/include/evas_private.h +++ b/src/lib/evas/include/evas_private.h @@ -1953,7 +1953,10 @@ struct _Evas_Mempool # define EVAS_MEMPOOL_INIT(x, nam, siz, cnt, ret) \ do { \ if (!x.mp) { \ - x.mp = eina_mempool_add("chained_mempool", nam, NULL, sizeof(siz), cnt); \ + const char *tmp, *choice = "chained_mempool"; \ + tmp = getenv("EINA_MEMPOOL"); \ + if (tmp && tmp[0]) choice = tmp; \ + x.mp = eina_mempool_add(choice, nam, NULL, sizeof(siz), cnt); \ if (!x.mp) { \ return ret; \ } \ -- 2.7.4