X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/78dd44ce3a2230c6f4093a35da7edda88cf3a106..dd5a646d37996bd34b2e5896b50a6f3d64779a45:/src/mc/mc_checkpoint.c diff --git a/src/mc/mc_checkpoint.c b/src/mc/mc_checkpoint.c index cd2beff86e..3e96454766 100644 --- a/src/mc/mc_checkpoint.c +++ b/src/mc/mc_checkpoint.c @@ -88,6 +88,8 @@ static mc_mem_region_t MC_region_new(int type, void *start_addr, size_t size) new_reg->start_addr = start_addr; new_reg->size = size; new_reg->data = mmap(NULL, size, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); + if(new_reg->data==MAP_FAILED) + xbt_die("Could not mmap new memory for snapshot."); memcpy(new_reg->data, start_addr, size); madvise(new_reg->data, size, MADV_MERGEABLE);