discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=da127a69d0351011e876ba201dd4c6c471469e7a

commit da127a69d0351011e876ba201dd4c6c471469e7a
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Fri Feb 5 14:34:29 2016 -0500

    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; \
        } \

-- 


Reply via email to