Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Fix broken mc_snapshot_get_heap_end()
[simgrid.git] / src / mc / mc_snapshot.h
index 70b37f8..7591a31 100644 (file)
@@ -200,6 +200,7 @@ typedef struct s_fd_infos{
 
 struct s_mc_snapshot {
   mc_process_t process;
+  int num_state;
   s_mc_address_space_t address_space;
   size_t heap_bytes_used;
   mc_mem_region_t* snapshot_regions;
@@ -251,8 +252,10 @@ typedef struct s_mc_global_t {
   int prev_pair;
   char *prev_req;
   int initial_communications_pattern_done;
-  int comm_deterministic;
+  int recv_deterministic;
   int send_deterministic;
+  char *send_diff;
+  char *recv_diff;
 }s_mc_global_t, *mc_global_t;
 
 typedef struct s_mc_checkpoint_ignore_region{
@@ -300,10 +303,7 @@ const void* mc_snapshot_get_heap_end(mc_snapshot_t snapshot)
 {
   if(snapshot==NULL)
       xbt_die("snapshot is NULL");
-  // This is &std_heap->breakval in the target process:
-  void** addr = &MC_process_get_heap(&mc_model_checker->process)->breakval;
-  // Read (std_heap->breakval) in the target process (*addr i.e. std_heap->breakval):
-  return MC_snapshot_read_pointer(snapshot, addr, MC_PROCESS_INDEX_ANY);
+  return MC_process_get_heap(&mc_model_checker->process)->breakval;
 }
 
 /** @brief Read memory from a snapshot region