summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2016-09-19 14:02:43 -0700
committerCedric BAIL <cedric@osg.samsung.com>2016-09-19 15:26:06 -0700
commit5f9bdb6120f473fbadf3cbeb7e4d04d3a87970c8 (patch)
tree9c2a5d90d71af1656107eb1b10e725afa6ef2a08
parent32ecb77191741bd6f1a90f902397bcb5f27dc341 (diff)
eina: populate memory in the right limit.efl-1.9
-rw-r--r--src/lib/eina/eina_file.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/eina/eina_file.c b/src/lib/eina/eina_file.c
index d86313bcbf..1679f8aabc 100644
--- a/src/lib/eina/eina_file.c
+++ b/src/lib/eina/eina_file.c
@@ -332,12 +332,14 @@ _eina_file_map_populate(char *map, unsigned int size, Eina_Bool hugetlb)
332 unsigned int i; 332 unsigned int i;
333 unsigned int s; 333 unsigned int s;
334 334
335 if (size == 0) return 0;
336
335 s = hugetlb ? EINA_HUGE_PAGE : EINA_SMALL_PAGE; 337 s = hugetlb ? EINA_HUGE_PAGE : EINA_SMALL_PAGE;
336 338
337 for (i = 0; i < size; i += s) 339 for (i = 0; i < size; i += s)
338 r ^= map[i]; 340 r ^= map[i];
339 341
340 r ^= map[size]; 342 r ^= map[size - 1];
341 343
342 return r; 344 return r;
343} 345}