Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove/cleanup/fix some #include
[simgrid.git] / src / mc / mc_snapshot.cpp
index ec1bd47..aacc9d1 100644 (file)
@@ -4,7 +4,13 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#include <stdbool.h>
+#include <cstddef>
+
+#include <memory>
+#include <utility>
+
+#include <xbt/asserts.h>
+#include <xbt/sysdep.h>
 
 #include "src/internal_config.h"
 #include "src/smpi/private.h"
@@ -232,8 +238,10 @@ static void test_snapshot(bool sparse_checkpoint) {
   _sg_mc_sparse_checkpoint = sparse_checkpoint;
   xbt_assert(xbt_pagesize == getpagesize());
   xbt_assert(1 << xbt_pagebits == xbt_pagesize);
-  mc_model_checker = new ::simgrid::mc::ModelChecker(getpid(), -1);
-  mc_model_checker->init_process();
+
+  std::unique_ptr<simgrid::mc::Process> process(new simgrid::mc::Process(getpid(), -1));
+  process->init();
+  mc_model_checker = new ::simgrid::mc::ModelChecker(std::move(process));
 
   for(int n=1; n!=256; ++n) {