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:25:11 -0700
commit698c213823fb9cb21f8ea956e8619f849e7222be (patch)
treeb843ec020db429c20592f6f77bf2c57b497374d2
parent9e7acfc6974416b67b13c53d0e78cb39fc3b1764 (diff)
eina: populate memory in the right limit.efl-1.13
-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 08e3a2dc39..ef3e9d24c5 100644
--- a/src/lib/eina/eina_file.c
+++ b/src/lib/eina/eina_file.c
@@ -333,12 +333,14 @@ _eina_file_map_populate(char *map, unsigned int size, Eina_Bool hugetlb)
333 unsigned int i; 333 unsigned int i;
334 unsigned int s; 334 unsigned int s;
335 335
336 if (size == 0) return 0;
337
336 s = hugetlb ? EINA_HUGE_PAGE : EINA_SMALL_PAGE; 338 s = hugetlb ? EINA_HUGE_PAGE : EINA_SMALL_PAGE;
337 339
338 for (i = 0; i < size; i += s) 340 for (i = 0; i < size; i += s)
339 r ^= map[i]; 341 r ^= map[i];
340 342
341 r ^= map[size]; 343 r ^= map[size - 1];
342 344
343 return r; 345 return r;
344} 346}