Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
MADV_MERGEABLE is available on linux, guard it.
authorMatthieu Volat <mazhe@alkumuna.eu>
Tue, 1 Nov 2016 07:24:14 +0000 (08:24 +0100)
committerdegomme <augustin.degomme@unibas.ch>
Tue, 1 Nov 2016 13:32:42 +0000 (14:32 +0100)
src/mc/RegionSnapshot.cpp

index c10dee8..7884740 100644 (file)
@@ -93,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);