summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-01-12 02:59:34 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-01-12 03:02:43 +0900
commitf32f0d89f4c42080ff28d2b5a201f6ce8e0206b1 (patch)
tree95e23ee1b442d3602f1b9bc0d18f1ae94bd7a420
parentfb048e73120b39095cc87aa4f8d7f3d397a93c56 (diff)
mmap memory allocation - do not used when under valgrind
we can't sensibly use things like massif to track memory if we bypass itr with mmaping -1 fd anonymous memory... so if built with valgrind support and running under valgrind, use malloc/calloc and free so these tools actually do something useful for these bits of memory.
-rw-r--r--src/lib/eina/eina_debug_chunk.c23
-rw-r--r--src/lib/eina/eina_evlog.c33
-rw-r--r--src/lib/eina/eina_safepointer.c83
-rw-r--r--src/lib/eo/eo.c46
-rw-r--r--src/lib/eo/eo_add_fallback.c39
-rw-r--r--src/lib/eo/eo_ptr_indirection.x81
-rw-r--r--src/lib/evas/common/evas_image_main.c5
7 files changed, 214 insertions, 96 deletions
diff --git a/src/lib/eina/eina_debug_chunk.c b/src/lib/eina/eina_debug_chunk.c
index 36629198a0..4ee9655140 100644
--- a/src/lib/eina/eina_debug_chunk.c
+++ b/src/lib/eina/eina_debug_chunk.c
@@ -24,6 +24,11 @@
24# include "config.h" 24# include "config.h"
25# endif 25# endif
26 26
27#ifdef HAVE_VALGRIND
28# include <valgrind.h>
29# include <memcheck.h>
30#endif
31
27#ifdef HAVE_MMAP 32#ifdef HAVE_MMAP
28# include <sys/mman.h> 33# include <sys/mman.h>
29 34
@@ -50,9 +55,15 @@ _eina_debug_chunk_need(int size)
50{ 55{
51 void *ptr; 56 void *ptr;
52 57
53 ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, 58#ifdef HAVE_VALGRIND
54 MAP_PRIVATE | MAP_ANON, -1, 0); 59 if (RUNNING_ON_VALGRIND) ptr = malloc(size);
55 if (ptr == MAP_FAILED) return NULL; 60 else
61#endif
62 {
63 ptr = mmap(NULL, size, PROT_READ | PROT_WRITE,
64 MAP_PRIVATE | MAP_ANON, -1, 0);
65 if (ptr == MAP_FAILED) return NULL;
66 }
56 return ptr; 67 return ptr;
57} 68}
58 69
@@ -60,7 +71,11 @@ _eina_debug_chunk_need(int size)
60static void 71static void
61_eina_debug_chunk_noneed(void *ptr, int size) 72_eina_debug_chunk_noneed(void *ptr, int size)
62{ 73{
63 munmap(ptr, size); 74#ifdef HAVE_VALGRIND
75 if (RUNNING_ON_VALGRIND) free(ptr);
76 else
77#endif
78 munmap(ptr, size);
64} 79}
65 80
66// push a new bit of mem on our growing stack of mem - given our workload, 81// push a new bit of mem on our growing stack of mem - given our workload,
diff --git a/src/lib/eina/eina_evlog.c b/src/lib/eina/eina_evlog.c
index 9c9cbccdaf..3e5f3c55f2 100644
--- a/src/lib/eina/eina_evlog.c
+++ b/src/lib/eina/eina_evlog.c
@@ -20,6 +20,11 @@
20# include "config.h" 20# include "config.h"
21#endif 21#endif
22 22
23#ifdef HAVE_VALGRIND
24# include <valgrind.h>
25# include <memcheck.h>
26#endif
27
23#include "Eina.h" 28#include "Eina.h"
24#include "eina_evlog.h" 29#include "eina_evlog.h"
25#include "eina_debug.h" 30#include "eina_debug.h"
@@ -97,13 +102,19 @@ alloc_buf(Eina_Evlog_Buf *b, unsigned int size)
97 if (b->buf) return; 102 if (b->buf) return;
98 b->size = size; 103 b->size = size;
99 b->top = 0; 104 b->top = 0;
100# ifdef HAVE_MMAP 105#ifdef HAVE_MMAP
101 b->buf = mmap(NULL, size, PROT_READ | PROT_WRITE, 106# ifdef HAVE_VALGRIND
102 MAP_PRIVATE | MAP_ANON, -1, 0); 107 if (RUNNING_ON_VALGRIND) b->buf = malloc(size);
103 if (b->buf == MAP_FAILED) b->buf = NULL; 108 else
104# else
105 b->buf = malloc(size);
106# endif 109# endif
110 {
111 b->buf = mmap(NULL, size, PROT_READ | PROT_WRITE,
112 MAP_PRIVATE | MAP_ANON, -1, 0);
113 if (b->buf == MAP_FAILED) b->buf = NULL;
114 }
115#else
116 b->buf = malloc(size);
117#endif
107 b->overflow = 0; 118 b->overflow = 0;
108} 119}
109 120
@@ -111,11 +122,15 @@ static void
111free_buf(Eina_Evlog_Buf *b) 122free_buf(Eina_Evlog_Buf *b)
112{ 123{
113 if (!b->buf) return; 124 if (!b->buf) return;
114# ifdef HAVE_MMAP 125#ifdef HAVE_MMAP
126# ifdef HAVE_VALGRIND
127 if (RUNNING_ON_VALGRIND) free(b->buf);
128 else
129# endif
115 munmap(b->buf, b->size); 130 munmap(b->buf, b->size);
116# else 131#else
117 free(b->buf); 132 free(b->buf);
118# endif 133#endif
119 b->buf = NULL; 134 b->buf = NULL;
120 b->size = 0; 135 b->size = 0;
121 b->top = 0; 136 b->top = 0;
diff --git a/src/lib/eina/eina_safepointer.c b/src/lib/eina/eina_safepointer.c
index 94ec1ab557..1a19f851c7 100644
--- a/src/lib/eina/eina_safepointer.c
+++ b/src/lib/eina/eina_safepointer.c
@@ -2,6 +2,11 @@
2# include "config.h" 2# include "config.h"
3#endif 3#endif
4 4
5#ifdef HAVE_VALGRIND
6# include <valgrind.h>
7# include <memcheck.h>
8#endif
9
5#include <stdint.h> 10#include <stdint.h>
6#include <stdio.h> 11#include <stdio.h>
7#include <stdlib.h> 12#include <stdlib.h>
@@ -66,26 +71,32 @@ static void *
66_eina_safepointer_calloc(int number, size_t size) 71_eina_safepointer_calloc(int number, size_t size)
67{ 72{
68#ifdef HAVE_MMAP 73#ifdef HAVE_MMAP
69 Eina_Memory_Header *header; 74# ifdef HAVE_VALGRIND
70 size_t newsize; 75 if (RUNNING_ON_VALGRIND) return calloc(number, size);
76 else
77# endif
78 {
79 Eina_Memory_Header *header;
80 size_t newsize;
71 81
72 size = size * number + sizeof (Eina_Memory_Header); 82 size = size * number + sizeof (Eina_Memory_Header);
73 newsize = ((size / MEM_PAGE_SIZE) + 83 newsize = ((size / MEM_PAGE_SIZE) +
74 (size % MEM_PAGE_SIZE ? 1 : 0)) 84 (size % MEM_PAGE_SIZE ? 1 : 0))
75 * MEM_PAGE_SIZE; 85 * MEM_PAGE_SIZE;
76 86
77 header = mmap(NULL, newsize, PROT_READ | PROT_WRITE, 87 header = mmap(NULL, newsize, PROT_READ | PROT_WRITE,
78 MAP_PRIVATE | MAP_ANON, -1, 0); 88 MAP_PRIVATE | MAP_ANON, -1, 0);
79 if (header == MAP_FAILED) 89 if (header == MAP_FAILED)
80 { 90 {
81 ERR("mmap of Eina_Safepointer table region failed."); 91 ERR("mmap of Eina_Safepointer table region failed.");
82 return NULL; 92 return NULL;
83 } 93 }
84 94
85 header->size = newsize; 95 header->size = newsize;
86 EINA_MAGIC_SET(header, SAFEPOINTER_MAGIC); 96 EINA_MAGIC_SET(header, SAFEPOINTER_MAGIC);
87 97
88 return (void*)(header + 1); 98 return (void *)(header + 1);
99 }
89#else 100#else
90 return calloc(number, size); 101 return calloc(number, size);
91#endif 102#endif
@@ -95,18 +106,24 @@ static void
95_eina_safepointer_free(void *pointer) 106_eina_safepointer_free(void *pointer)
96{ 107{
97#ifdef HAVE_MMAP 108#ifdef HAVE_MMAP
98 Eina_Memory_Header *header; 109# ifdef HAVE_VALGRIND
110 if (RUNNING_ON_VALGRIND) free((void *)((uintptr_t) pointer & ~0x3));
111 else
112# endif
113 {
114 Eina_Memory_Header *header;
99 115
100 if (!pointer) return ; 116 if (!pointer) return;
101 117
102 header = (Eina_Memory_Header*)(pointer) - 1; 118 header = (Eina_Memory_Header*)(pointer) - 1;
103 if (!EINA_MAGIC_CHECK(header, SAFEPOINTER_MAGIC)) 119 if (!EINA_MAGIC_CHECK(header, SAFEPOINTER_MAGIC))
104 EINA_MAGIC_FAIL(header, SAFEPOINTER_MAGIC); 120 EINA_MAGIC_FAIL(header, SAFEPOINTER_MAGIC);
105 121
106 EINA_MAGIC_SET(header, 0); 122 EINA_MAGIC_SET(header, 0);
107 munmap(header, header->size); 123 munmap(header, header->size);
124 }
108#else 125#else
109 free((void*) ((uintptr_t) pointer & ~0x3)); 126 free((void *)((uintptr_t) pointer & ~0x3));
110#endif 127#endif
111} 128}
112 129
@@ -115,15 +132,21 @@ static void
115_eina_safepointer_protect(void *pointer, Eina_Bool may_not_write) 132_eina_safepointer_protect(void *pointer, Eina_Bool may_not_write)
116{ 133{
117#ifdef HAVE_MMAP 134#ifdef HAVE_MMAP
118 Eina_Memory_Header *header; 135# ifdef HAVE_VALGRIND
136 if (RUNNING_ON_VALGRIND) { (void) pointer; }
137 else
138# endif
139 {
140 Eina_Memory_Header *header;
119 141
120 if (!pointer) return ; 142 if (!pointer) return;
121 143
122 header = (Eina_Memory_Header*)(pointer) - 1; 144 header = (Eina_Memory_Header*)(pointer) - 1;
123 if (!EINA_MAGIC_CHECK(header, SAFEPOINTER_MAGIC)) 145 if (!EINA_MAGIC_CHECK(header, SAFEPOINTER_MAGIC))
124 EINA_MAGIC_FAIL(header, SAFEPOINTER_MAGIC); 146 EINA_MAGIC_FAIL(header, SAFEPOINTER_MAGIC);
125 147
126 mprotect(header, header->size, PROT_READ | ( may_not_write ? 0 : PROT_WRITE)); 148 mprotect(header, header->size, PROT_READ | ( may_not_write ? 0 : PROT_WRITE));
149 }
127#else 150#else
128 (void) pointer; 151 (void) pointer;
129#endif 152#endif
diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index d421c58bc8..50df250acf 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -1383,10 +1383,16 @@ static inline void
1383_eo_classes_release(void) 1383_eo_classes_release(void)
1384{ 1384{
1385#ifdef HAVE_MMAP 1385#ifdef HAVE_MMAP
1386 size_t size; 1386# ifdef HAVE_VALGRIND
1387 if (RUNNING_ON_VALGRIND) free(_eo_classes);
1388 else
1389# endif
1390 {
1391 size_t size;
1387 1392
1388 size = _eo_classes_alloc * sizeof(_Efl_Class *); 1393 size = _eo_classes_alloc * sizeof(_Efl_Class *);
1389 if (_eo_classes) munmap(_eo_classes, size); 1394 if (_eo_classes) munmap(_eo_classes, size);
1395 }
1390#else 1396#else
1391 free(_eo_classes); 1397 free(_eo_classes);
1392#endif 1398#endif
@@ -1405,17 +1411,33 @@ _eo_classes_expand(void)
1405 if (_eo_classes_last_id <= _eo_classes_alloc) return; 1411 if (_eo_classes_last_id <= _eo_classes_alloc) return;
1406 psize = _eo_classes_alloc * sizeof(_Efl_Class *); 1412 psize = _eo_classes_alloc * sizeof(_Efl_Class *);
1407#ifdef HAVE_MMAP 1413#ifdef HAVE_MMAP
1408 _eo_classes_alloc += (MEM_PAGE_SIZE / sizeof(_Efl_Class *)); 1414# ifdef HAVE_VALGRIND
1409 newsize = _eo_classes_alloc * sizeof(_Efl_Class *); 1415 if (RUNNING_ON_VALGRIND)
1410 ptr = mmap(NULL, newsize, PROT_READ | PROT_WRITE,
1411 MAP_PRIVATE | MAP_ANON, -1, 0);
1412 if (ptr == MAP_FAILED)
1413 { 1416 {
1414 ERR("mmap of eo class table region failed!"); 1417 _eo_classes_alloc += 128;
1415 abort(); 1418 newsize = _eo_classes_alloc * sizeof(_Efl_Class *);
1419 ptr = realloc(_eo_classes, newsize);
1420 if (!ptr)
1421 {
1422 ERR("realloc of eo class table region faile!!");
1423 abort();
1424 }
1425 }
1426 else
1427# endif
1428 {
1429 _eo_classes_alloc += (MEM_PAGE_SIZE / sizeof(_Efl_Class *));
1430 newsize = _eo_classes_alloc * sizeof(_Efl_Class *);
1431 ptr = mmap(NULL, newsize, PROT_READ | PROT_WRITE,
1432 MAP_PRIVATE | MAP_ANON, -1, 0);
1433 if (ptr == MAP_FAILED)
1434 {
1435 ERR("mmap of eo class table region failed!");
1436 abort();
1437 }
1438 if (psize > 0) memcpy(ptr, _eo_classes, psize);
1439 if (_eo_classes) munmap(_eo_classes, psize);
1416 } 1440 }
1417 if (psize > 0) memcpy(ptr, _eo_classes, psize);
1418 if (_eo_classes) munmap(_eo_classes, psize);
1419#else 1441#else
1420 _eo_classes_alloc += 128; 1442 _eo_classes_alloc += 128;
1421 newsize = _eo_classes_alloc * sizeof(_Efl_Class *); 1443 newsize = _eo_classes_alloc * sizeof(_Efl_Class *);
diff --git a/src/lib/eo/eo_add_fallback.c b/src/lib/eo/eo_add_fallback.c
index c38a827b28..f3a82f25d6 100644
--- a/src/lib/eo/eo_add_fallback.c
+++ b/src/lib/eo/eo_add_fallback.c
@@ -2,6 +2,11 @@
2# include <config.h> 2# include <config.h>
3#endif 3#endif
4 4
5#ifdef HAVE_VALGRIND
6# include <valgrind.h>
7# include <memcheck.h>
8#endif
9
5#if defined HAVE_DLADDR && ! defined _WIN32 10#if defined HAVE_DLADDR && ! defined _WIN32
6# include <dlfcn.h> 11# include <dlfcn.h>
7#endif 12#endif
@@ -32,20 +37,26 @@ static void *
32_eo_call_stack_mem_alloc(size_t size) 37_eo_call_stack_mem_alloc(size_t size)
33{ 38{
34#ifdef HAVE_MMAP 39#ifdef HAVE_MMAP
35 // allocate eo call stack via mmped anon segment if on linux - more 40# ifdef HAVE_VALGRIND
36 // secure and safe. also gives page aligned memory allowing madvise 41 if (RUNNING_ON_VALGRIND) return calloc(1, size);
37 void *ptr; 42 else
38 size_t newsize; 43# endif
39 newsize = MEM_PAGE_SIZE * ((size + MEM_PAGE_SIZE - 1) /
40 MEM_PAGE_SIZE);
41 ptr = mmap(NULL, newsize, PROT_READ | PROT_WRITE,
42 MAP_PRIVATE | MAP_ANON, -1, 0);
43 if (ptr == MAP_FAILED)
44 { 44 {
45 ERR("eo call stack mmap failed."); 45 // allocate eo call stack via mmped anon segment if on linux - more
46 return NULL; 46 // secure and safe. also gives page aligned memory allowing madvise
47 void *ptr;
48 size_t newsize;
49 newsize = MEM_PAGE_SIZE * ((size + MEM_PAGE_SIZE - 1) /
50 MEM_PAGE_SIZE);
51 ptr = mmap(NULL, newsize, PROT_READ | PROT_WRITE,
52 MAP_PRIVATE | MAP_ANON, -1, 0);
53 if (ptr == MAP_FAILED)
54 {
55 ERR("eo call stack mmap failed.");
56 return NULL;
57 }
58 return ptr;
47 } 59 }
48 return ptr;
49#else 60#else
50 //in regular cases just use malloc 61 //in regular cases just use malloc
51 return calloc(1, size); 62 return calloc(1, size);
@@ -56,6 +67,10 @@ static void
56_eo_call_stack_mem_free(void *ptr, size_t size) 67_eo_call_stack_mem_free(void *ptr, size_t size)
57{ 68{
58#ifdef HAVE_MMAP 69#ifdef HAVE_MMAP
70# ifdef HAVE_VALGRIND
71 if (RUNNING_ON_VALGRIND) free(ptr);
72 else
73# endif
59 munmap(ptr, size); 74 munmap(ptr, size);
60#else 75#else
61 (void) size; 76 (void) size;
diff --git a/src/lib/eo/eo_ptr_indirection.x b/src/lib/eo/eo_ptr_indirection.x
index f4311e1c3a..d6affe0cc6 100644
--- a/src/lib/eo/eo_ptr_indirection.x
+++ b/src/lib/eo/eo_ptr_indirection.x
@@ -6,6 +6,11 @@
6#include <sys/mman.h> 6#include <sys/mman.h>
7#endif 7#endif
8 8
9#ifdef HAVE_VALGRIND
10# include <valgrind.h>
11# include <memcheck.h>
12#endif
13
9/* Start of pointer indirection: 14/* Start of pointer indirection:
10 * 15 *
11 * This feature is responsible of hiding from the developer the real pointer of 16 * This feature is responsible of hiding from the developer the real pointer of
@@ -149,23 +154,29 @@ static void *
149_eo_id_mem_alloc(size_t size) 154_eo_id_mem_alloc(size_t size)
150{ 155{
151#ifdef HAVE_MMAP 156#ifdef HAVE_MMAP
152 void *ptr; 157# ifdef HAVE_VALGRIND
153 Mem_Header *hdr; 158 if (RUNNING_ON_VALGRIND) return malloc(size);
154 size_t newsize; 159 else
155 newsize = MEM_PAGE_SIZE * ((size + MEM_HEADER_SIZE + MEM_PAGE_SIZE - 1) / 160# endif
156 MEM_PAGE_SIZE);
157 ptr = mmap(NULL, newsize, PROT_READ | PROT_WRITE,
158 MAP_PRIVATE | MAP_ANON, -1, 0);
159 if (ptr == MAP_FAILED)
160 { 161 {
161 ERR("mmap of eo id table region failed!"); 162 void *ptr;
162 return NULL; 163 Mem_Header *hdr;
164 size_t newsize;
165 newsize = MEM_PAGE_SIZE * ((size + MEM_HEADER_SIZE + MEM_PAGE_SIZE - 1) /
166 MEM_PAGE_SIZE);
167 ptr = mmap(NULL, newsize, PROT_READ | PROT_WRITE,
168 MAP_PRIVATE | MAP_ANON, -1, 0);
169 if (ptr == MAP_FAILED)
170 {
171 ERR("mmap of eo id table region failed!");
172 return NULL;
173 }
174 hdr = ptr;
175 hdr->size = newsize;
176 hdr->magic = MEM_MAGIC;
177 /* DBG("asked:%lu allocated:%lu wasted:%lu bytes", size, newsize, (newsize - size)); */
178 return (void *)(((unsigned char *)ptr) + MEM_HEADER_SIZE);
163 } 179 }
164 hdr = ptr;
165 hdr->size = newsize;
166 hdr->magic = MEM_MAGIC;
167 /* DBG("asked:%lu allocated:%lu wasted:%lu bytes", size, newsize, (newsize - size)); */
168 return (void *)(((unsigned char *)ptr) + MEM_HEADER_SIZE);
169#else 180#else
170 return malloc(size); 181 return malloc(size);
171#endif 182#endif
@@ -184,15 +195,21 @@ static void
184_eo_id_mem_free(void *ptr) 195_eo_id_mem_free(void *ptr)
185{ 196{
186#ifdef HAVE_MMAP 197#ifdef HAVE_MMAP
187 Mem_Header *hdr; 198# ifdef HAVE_VALGRIND
188 if (!ptr) return; 199 if (RUNNING_ON_VALGRIND) free(ptr);
189 hdr = (Mem_Header *)(((unsigned char *)ptr) - MEM_HEADER_SIZE); 200 else
190 if (hdr->magic != MEM_MAGIC) 201# endif
191 { 202 {
192 ERR("unmap of eo table region has bad magic!"); 203 Mem_Header *hdr;
193 return; 204 if (!ptr) return;
205 hdr = (Mem_Header *)(((unsigned char *)ptr) - MEM_HEADER_SIZE);
206 if (hdr->magic != MEM_MAGIC)
207 {
208 ERR("unmap of eo table region has bad magic!");
209 return;
210 }
211 munmap(hdr, hdr->size);
194 } 212 }
195 munmap(hdr, hdr->size);
196#else 213#else
197 free(ptr); 214 free(ptr);
198#endif 215#endif
@@ -203,15 +220,21 @@ static void
203_eo_id_mem_protect(void *ptr, Eina_Bool may_not_write) 220_eo_id_mem_protect(void *ptr, Eina_Bool may_not_write)
204{ 221{
205# ifdef HAVE_MMAP 222# ifdef HAVE_MMAP
206 Mem_Header *hdr; 223# ifdef HAVE_VALGRIND
207 if (!ptr) return; 224 if (RUNNING_ON_VALGRIND) { return; }
208 hdr = (Mem_Header *)(((unsigned char *)ptr) - MEM_HEADER_SIZE); 225 else
209 if (hdr->magic != MEM_MAGIC) 226# endif
210 { 227 {
211 ERR("mprotect of eo table region has bad magic!"); 228 Mem_Header *hdr;
212 return; 229 if (!ptr) return;
230 hdr = (Mem_Header *)(((unsigned char *)ptr) - MEM_HEADER_SIZE);
231 if (hdr->magic != MEM_MAGIC)
232 {
233 ERR("mprotect of eo table region has bad magic!");
234 return;
235 }
236 mprotect(hdr, hdr->size, PROT_READ | ( may_not_write ? 0 : PROT_WRITE) );
213 } 237 }
214 mprotect(hdr, hdr->size, PROT_READ | ( may_not_write ? 0 : PROT_WRITE) );
215# endif 238# endif
216} 239}
217# define PROTECT(_ptr_) _eo_id_mem_protect((_ptr_), EINA_TRUE) 240# define PROTECT(_ptr_) _eo_id_mem_protect((_ptr_), EINA_TRUE)
diff --git a/src/lib/evas/common/evas_image_main.c b/src/lib/evas/common/evas_image_main.c
index 591f82fb99..404c70b566 100644
--- a/src/lib/evas/common/evas_image_main.c
+++ b/src/lib/evas/common/evas_image_main.c
@@ -17,6 +17,7 @@
17//#include "evas_cs.h" 17//#include "evas_cs.h"
18 18
19#ifdef HAVE_VALGRIND 19#ifdef HAVE_VALGRIND
20# include <valgrind.h>
20# include <memcheck.h> 21# include <memcheck.h>
21#endif 22#endif
22 23
@@ -115,6 +116,10 @@ _evas_common_rgba_image_surface_size(unsigned int w, unsigned int h,
115 int siz, block_size = 8; 116 int siz, block_size = 8;
116 Eina_Bool reset_borders = EINA_TRUE; 117 Eina_Bool reset_borders = EINA_TRUE;
117 118
119#ifdef HAVE_VALGRIND
120 if (RUNNING_ON_VALGRIND) evas_image_no_mmap = 1;
121#endif
122
118 if (EINA_UNLIKELY(evas_image_no_mmap == -1)) 123 if (EINA_UNLIKELY(evas_image_no_mmap == -1))
119 { 124 {
120 const char *s = getenv("EVAS_IMAGE_NO_MMAP"); 125 const char *s = getenv("EVAS_IMAGE_NO_MMAP");