Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Added some work in the creation of links in the fat trees, basically the repartion...
[simgrid.git] / src / mc / mc_checkpoint.c
index d287c80..7864e2c 100644 (file)
@@ -89,6 +89,7 @@ static mc_mem_region_t MC_region_new(int type, void *start_addr, size_t size)
   new_reg->size = size;
   new_reg->data = mmap(NULL, size, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
   memcpy(new_reg->data, start_addr, size);
+  mprotect(new_reg->data, size, PROT_READ);
   madvise(new_reg->data, size, MADV_MERGEABLE);
 
   XBT_DEBUG("New region : type : %d, data : %p (real addr %p), size : %zu", type, new_reg->data, start_addr, size);