A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
[mc] Give the real type of mc_heap/std_heap (xbt_mheap_t, not void*)
[simgrid.git]
/
src
/
mc
/
mc_checkpoint.c
diff --git
a/src/mc/mc_checkpoint.c
b/src/mc/mc_checkpoint.c
index
45708a7
..
9b21eb1
100644
(file)
--- a/
src/mc/mc_checkpoint.c
+++ b/
src/mc/mc_checkpoint.c
@@
-163,7
+163,7
@@
static void MC_snapshot_add_region(mc_snapshot_t snapshot, int type,
{
mc_mem_region_t ref_reg =
mc_model_checker->parent_snapshot ? mc_model_checker->parent_snapshot->regions[type] : NULL;
- mc_mem_region_t new_reg = MC_region_new(type, start_addr,
star
t_addr, size, ref_reg);
+ mc_mem_region_t new_reg = MC_region_new(type, start_addr,
permanen
t_addr, size, ref_reg);
snapshot->regions[type] = new_reg;
return;
}
@@
-171,8
+171,8
@@
static void MC_snapshot_add_region(mc_snapshot_t snapshot, int type,
static void MC_get_memory_regions(mc_snapshot_t snapshot)
{
- void *start_heap =
((xbt_mheap_t) std_heap)
->base;
- void *end_heap =
((xbt_mheap_t) std_heap)
->breakval;
+ void *start_heap =
std_heap
->base;
+ void *end_heap =
std_heap
->breakval;
MC_snapshot_add_region(snapshot, 0, start_heap, start_heap,
(char *) end_heap - (char *) start_heap);
snapshot->heap_bytes_used = mmalloc_get_bytes_used(std_heap);
@@
-193,9
+193,9
@@
static void MC_get_memory_regions(mc_snapshot_t snapshot)
mc_mem_region_t ref_reg =
mc_model_checker->parent_snapshot ? mc_model_checker->parent_snapshot->privatization_regions[i] : NULL;
snapshot->privatization_regions[i] =
- MC_region_new(-1, mc_binary_info->start_rw,
mappings[i]
, size_data_exe, ref_reg);
+ MC_region_new(-1, mc_binary_info->start_rw,
smpi_privatisation_regions[i].address
, size_data_exe, ref_reg);
}
- snapshot->privatization_index = loaded_page;
+ snapshot->privatization_index =
smpi_
loaded_page;
snapshot->regions[2] = NULL;
} else
#endif
@@
-667,7
+667,9
@@
void MC_restore_snapshot(mc_snapshot_t snapshot)
parent_snapshot ? parent_snapshot->privatization_regions[i] : NULL);
}
}
- switch_data_segment(snapshot->privatization_index);
+ }
+ if(snapshot->privatization_index >= 0) {
+ smpi_switch_data_segment(snapshot->privatization_index);
}
#endif