diff options
author | Cedric BAIL <cedric@osg.samsung.com> | 2016-09-19 14:02:43 -0700 |
---|---|---|
committer | Cedric BAIL <cedric@osg.samsung.com> | 2016-09-19 15:24:20 -0700 |
commit | f5e67635aa89cb48f0aedc1e5164a0ebf6466d6a (patch) | |
tree | 762bb4eef9989a8dadf260bd92015096a7da485c | |
parent | 789926c82df084400c9a89ceebc1e5165e6101b7 (diff) | |
download | efl-1.17.tar.gz |
eina: populate memory in the right limit.efl-1.17
-rw-r--r-- | src/lib/eina/eina_file.c | 4 |
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) unsigned int i; unsigned int s; + if (size == 0) return 0; + s = hugetlb ? EINA_HUGE_PAGE : EINA_SMALL_PAGE; for (i = 0; i < size; i += s) r ^= map[i]; - r ^= map[size]; + r ^= map[size - 1]; return r; } |