From 1306cfadb7f9b5c3dc4041eb6064a0d3a8bf72c2 Mon Sep 17 00:00:00 2001 From: Gabriel Corona Date: Mon, 29 Feb 2016 20:41:29 +0100 Subject: [PATCH] [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. --- src/smpi/smpi_bench.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.20.1