X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/2a07cc1dc95048c86a3fc76aca2e9c088f7b5025..612f154fb83700bd9c58a2e72c2ce7d98db81824:/src/mc/sosp/mc_snapshot_test.cpp?ds=sidebyside diff --git a/src/mc/sosp/mc_snapshot_test.cpp b/src/mc/sosp/mc_snapshot_test.cpp index 80a73570aa..eb8a84dfd0 100644 --- a/src/mc/sosp/mc_snapshot_test.cpp +++ b/src/mc/sosp/mc_snapshot_test.cpp @@ -82,12 +82,12 @@ snap_test_helper::prologue_return snap_test_helper::prologue(int n) // Init memory and take snapshots: init_memory(source, byte_size); simgrid::mc::RegionSnapshot* region0 = - simgrid::mc::sparse_region(simgrid::mc::RegionType::Unknown, source, source, byte_size); + new simgrid::mc::RegionSparse(simgrid::mc::RegionType::Unknown, source, source, byte_size); for (int i = 0; i < n; i += 2) { init_memory((char*)source + i * xbt_pagesize, xbt_pagesize); } simgrid::mc::RegionSnapshot* region = - simgrid::mc::sparse_region(simgrid::mc::RegionType::Unknown, source, source, byte_size); + new simgrid::mc::RegionSparse(simgrid::mc::RegionType::Unknown, source, source, byte_size); void* destination = mmap(nullptr, byte_size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); INFO("Could not allocate destination memory"); @@ -179,7 +179,7 @@ void snap_test_helper::read_pointer() prologue_return ret = prologue(1); memcpy(ret.src, &mc_model_checker, sizeof(void*)); simgrid::mc::RegionSnapshot* region2 = - simgrid::mc::sparse_region(simgrid::mc::RegionType::Unknown, ret.src, ret.src, ret.size); + new simgrid::mc::RegionSparse(simgrid::mc::RegionType::Unknown, ret.src, ret.src, ret.size); INFO("Mismtach in MC_region_read_pointer()"); REQUIRE(MC_region_read_pointer(region2, ret.src) == mc_model_checker); @@ -187,6 +187,7 @@ void snap_test_helper::read_pointer() munmap(ret.src, ret.size); delete ret.region0; delete ret.region; + delete region2; } /*************** End: class snap_test_helper *****************************/