Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Revert "Use private mapping (we already have early unlinking)."
authorPierre-Nicolas Clauss <pini@ethernium.org>
Thu, 9 Jun 2011 08:35:58 +0000 (10:35 +0200)
committerPierre-Nicolas Clauss <pini@ethernium.org>
Thu, 9 Jun 2011 08:35:58 +0000 (10:35 +0200)
Apparently, this blows out memory.

This reverts commit b3f59725051f14d38fc6d9f63474bda6c207830e.

src/smpi/smpi_bench.c

index 88c0aa6..e91f9c7 100644 (file)
@@ -91,7 +91,7 @@ static void* shm_map(int fd, size_t size, shared_data_t* data) {
       xbt_die("Could not truncate fd %d to %zu: %s", fd, size, strerror(errno));
     }
   }
-  mem = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0);
+  mem = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
   if(mem == MAP_FAILED) {
     xbt_die("Could not map fd %d: %s", fd, strerror(errno));
   }