From 3d50752e785a7b4931b3a95ea45f29cb33b72779 Mon Sep 17 00:00:00 2001 From: cristianrosa Date: Wed, 15 Dec 2010 17:14:57 +0000 Subject: [PATCH] Fix the detection of the raw_heap when snapshoting git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@9264 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- src/mc/mc_checkpoint.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/mc/mc_checkpoint.c b/src/mc/mc_checkpoint.c index d416f72a16..c1e8ea98aa 100644 --- a/src/mc/mc_checkpoint.c +++ b/src/mc/mc_checkpoint.c @@ -44,13 +44,11 @@ void MC_take_snapshot(mc_snapshot_t snapshot) s_map_region reg; memory_map_t maps = get_memory_map(); - /* Save all the writable mapped pages except the and the stack */ + /* Save all the writable mapped pages except the raw_heap and the stack */ for (i = 0; i < maps->mapsize; i++) { reg = maps->regions[i]; - if((reg.prot & PROT_WRITE) - && (reg.pathname == NULL - || (strncmp(reg.pathname, "/dev/zero", 9) - && strncmp(reg.pathname, "[stack]", 7)))){ + if((reg.prot & PROT_WRITE) && reg.start_addr != raw_heap + && (reg.pathname == NULL || strncmp(reg.pathname, "[stack]", 7))){ MC_snapshot_add_region(snapshot, reg.start_addr, (char*)reg.end_addr - (char*)reg.start_addr); } -- 2.20.1