Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Only enable KSM on snapshots and not on main memory
[simgrid.git] / src / mc / mc_global.c
index 7bba6ff..acbc818 100644 (file)
@@ -8,6 +8,7 @@
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <sys/time.h>
+#include <sys/mman.h>
 #include <libgen.h>
 
 #include "simgrid/sg_config.h"
@@ -213,6 +214,8 @@ void MC_free_object_info(mc_object_info_t* info) {
 // ***** Helpers
 
 void* MC_object_base_address(mc_object_info_t info) {
+  if(info->flags & MC_OBJECT_INFO_EXECUTABLE)
+    return 0;
   void* result = info->start_exec;
   if(info->start_rw!=NULL && result > (void*) info->start_rw) result = info->start_rw;
   if(info->start_ro!=NULL && result > (void*) info->start_ro) result = info->start_ro;