X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/c2f951e38bdf2b8639bf42b78b69c1530510b6f0..c9e3badfcca0d44e112171cefd237ed3f0ae01ca:/src/mc/RegionSnapshot.cpp diff --git a/src/mc/RegionSnapshot.cpp b/src/mc/RegionSnapshot.cpp index c1206077bb..4ebfbe1729 100644 --- a/src/mc/RegionSnapshot.cpp +++ b/src/mc/RegionSnapshot.cpp @@ -12,7 +12,7 @@ #endif #include "mc/mc.h" -#include "src/mc/mc_snapshot.h" +#include "src/mc/mc_snapshot.hpp" #include "src/mc/ChunkedData.hpp" #include "src/mc/RegionSnapshot.hpp" @@ -42,7 +42,7 @@ Buffer::Buffer(std::size_t size, Type type) : size_(size), type_(type) { switch(type_) { case Type::Malloc: - data_ = ::malloc(size_); + data_ = ::operator new(size_); break; case Type::Mmap: data_ = ::mmap(nullptr, size, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_POPULATE, -1, 0); @@ -62,7 +62,7 @@ void Buffer::clear() noexcept { switch(type_) { case Type::Malloc: - std::free(data_); + ::operator delete(data_); break; case Type::Mmap: if (munmap(data_, size_) != 0) @@ -137,8 +137,8 @@ RegionSnapshot sparse_region(RegionType region_type, "Not at the beginning of a page"); size_t page_count = simgrid::mc::mmu::chunkCount(size); - simgrid::mc::ChunkedData page_data( - mc_model_checker->page_store(), *process, permanent_addr, page_count); + simgrid::mc::ChunkedData page_data(mc_model_checker->page_store(), *process, RemotePtr(permanent_addr), + page_count); simgrid::mc::RegionSnapshot region( region_type, start_addr, permanent_addr, size);