eina: populate memory in the right limit.

This commit is contained in:
Cedric BAIL 2016-09-19 14:02:43 -07:00
parent e4958e9faa
commit 25aef34aa0
1 changed files with 3 additions and 1 deletions

View File

@ -316,12 +316,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;
}