-VisitedState::VisitedState(unsigned long state_number)
-{
- simgrid::mc::Process* process = &(mc_model_checker->process());
- this->heap_bytes_used = mmalloc_get_bytes_used_remote(
- process->get_heap()->heaplimit,
- process->get_malloc_info());
-
- this->actors_count = mc_model_checker->process().actors().size();
-
- this->system_state = simgrid::mc::take_snapshot(state_number);
- this->num = state_number;
- this->original_num = -1;
-}
-
-VisitedState::~VisitedState()
-{
+VisitedState::VisitedState(unsigned long state_number) : num(state_number)
+{
+ this->heap_bytes_used = mcapi::get().get_remote_heap_bytes();
+ this->actors_count = mcapi::get().get_actors_size();
+ this->system_state = std::make_shared<simgrid::mc::Snapshot>(state_number);