}
}
- MC_comm_pattern_free(comm);
+ delete comm;
}
initial_communications_pattern = xbt_dynar_new(sizeof(mc_list_comm_pattern_t), MC_list_comm_pattern_free_voidp);
for (i=0; i < maxpid; i++){
mc_list_comm_pattern_t process_list_pattern = xbt_new0(s_mc_list_comm_pattern_t, 1);
- process_list_pattern->list = xbt_dynar_new(sizeof(mc_comm_pattern_t), MC_comm_pattern_free_voidp);
+ process_list_pattern->list = simgrid::xbt::newDeleteDynar<s_mc_comm_pattern_t>();
process_list_pattern->index_comm = 0;
xbt_dynar_insert_at(initial_communications_pattern, i, &process_list_pattern);
}
simgrid::mc::request_to_string(
req, value, simgrid::mc::RequestType::simix).c_str());
- char* req_str = nullptr;
+ std::string req_str;
if (dot_output != nullptr)
req_str = simgrid::mc::request_get_dot_output(req, value);
MC_state_interleave_process(next_state.get(), &p.copy);
if (dot_output != nullptr)
- fprintf(dot_output, "\"%d\" -> \"%d\" [%s];\n", state->num, next_state->num, req_str);
+ fprintf(dot_output, "\"%d\" -> \"%d\" [%s];\n",
+ state->num, next_state->num, req_str.c_str());
} else if (dot_output != nullptr)
fprintf(dot_output, "\"%d\" -> \"%d\" [%s];\n",
- state->num, visited_state->other_num == -1 ? visited_state->num : visited_state->other_num, req_str);
+ state->num, visited_state->other_num == -1 ? visited_state->num : visited_state->other_num, req_str.c_str());
stack_.push_back(std::move(next_state));
- if (dot_output != nullptr)
- xbt_free(req_str);
-
} else {
if (stack_.size() > (std::size_t) _sg_mc_max_depth)
XBT_INFO("Check communication determinism");
mc_model_checker->wait_for_requests();
- if (mc_mode == MC_MODE_CLIENT)
- // This will move somehwere else:
- simgrid::mc::Client::get()->handleMessages();
-
this->prepare();
initial_global_state = std::unique_ptr<s_mc_global_t>(new s_mc_global_t());