Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Cache the size of a memory page for the current system.
[simgrid.git] / src / xbt / mmalloc / mm_module.c
index 7cfde64..08f9de2 100644 (file)
@@ -323,7 +323,7 @@ void *mmalloc_preinit(void)
 {
   int res;
   if (__mmalloc_default_mdp == NULL) {
-    unsigned long mask = ~((unsigned long)getpagesize() - 1);
+    unsigned long mask = ~((unsigned long)xbt_pagesize - 1);
     void *addr = (void*)(((unsigned long)sbrk(0) + HEAP_OFFSET) & mask);
     __mmalloc_default_mdp = xbt_mheap_new(-1, addr);
     /* Fixme? only the default mdp in protected against forks */