X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/706dd4584b4002e0d948b81d103dd5c4b70db077..3c0ec158c879d3ad3891ee9cb05304b8fff0255f:/src/mc/RegionSnapshot.cpp diff --git a/src/mc/RegionSnapshot.cpp b/src/mc/RegionSnapshot.cpp index 7acb69d634..7884740527 100644 --- a/src/mc/RegionSnapshot.cpp +++ b/src/mc/RegionSnapshot.cpp @@ -7,6 +7,9 @@ #include #include +#ifdef __FreeBSD__ +# define MAP_POPULATE MAP_PREFAULT_READ +#endif #include "mc/mc.h" #include "src/mc/mc_snapshot.h" @@ -90,10 +93,12 @@ RegionSnapshot dense_region( remote(permanent_addr), simgrid::mc::ProcessIndexDisabled); +#ifdef __linux__ if (_sg_mc_ksm) // Mark the region as mergeable *after* we have written into it. // Trying to merge them before is useless/counterproductive. madvise(data.get(), size, MADV_MERGEABLE); +#endif simgrid::mc::RegionSnapshot region( region_type, start_addr, permanent_addr, size);