Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[smpi] Fix ENAMETOOLONG with shm_open in smpi_shared_malloc on MacOS X
[simgrid.git] / src / smpi / smpi_bench.cpp
index c7c1dc1c11ad9fc69d0d068fd7815e0f8698bae2..21f2fd0b5cbaf629016c94677db4936054e4d689 100644 (file)
@@ -490,7 +490,7 @@ void *smpi_shared_malloc(size_t size, const char *file, int line)
       // The insertion did not take place.
       // Generate a shared memory name from the address of the shared_data:
       char shmname[256];
-      sprintf(shmname, "smpi_shared_malloc_%p", &*data);
+      sprintf(shmname, "/shmalloc%p", &*data);
       fd = shm_open(shmname, O_RDWR | O_CREAT | O_EXCL,
                     S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
       if (fd < 0) {