From: Gabriel Corona Date: Mon, 29 Feb 2016 19:41:29 +0000 (+0100) Subject: [smpi] Fix shared memoy name for SMPI_SHARED_MALLOC X-Git-Tag: v3_13~617^2 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/1306cfadb7f9b5c3dc4041eb6064a0d3a8bf72c2 [smpi] Fix shared memoy name for SMPI_SHARED_MALLOC The name is expected to start with a '/'. This should fix SMPI_SHARED_MALLOC on MacOS X. --- diff --git a/src/smpi/smpi_bench.cpp b/src/smpi/smpi_bench.cpp index c7c1dc1c11..516d22af95 100644 --- a/src/smpi/smpi_bench.cpp +++ b/src/smpi/smpi_bench.cpp @@ -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, "/smpi_shared_malloc_%p", &*data); fd = shm_open(shmname, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); if (fd < 0) {