Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use private mapping (we already have early unlinking).
authorPierre-Nicolas Clauss <pini@ethernium.org>
Wed, 8 Jun 2011 19:57:31 +0000 (21:57 +0200)
committerPierre-Nicolas Clauss <pini@ethernium.org>
Wed, 8 Jun 2011 19:57:31 +0000 (21:57 +0200)
src/smpi/smpi_bench.c

index e91f9c7..88c0aa6 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_SHARED, fd, 0);
+  mem = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0);
   if(mem == MAP_FAILED) {
     xbt_die("Could not map fd %d: %s", fd, strerror(errno));
   }