Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
A call to bprintf is enough here.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 4 Oct 2017 09:24:06 +0000 (11:24 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 4 Oct 2017 13:44:47 +0000 (15:44 +0200)
src/smpi/internals/smpi_shared.cpp

index 9291073..728b97a 100644 (file)
@@ -232,8 +232,7 @@ void* smpi_shared_malloc_partial(size_t size, size_t* shared_block_offsets, int
    * We cannot use a same file for the two type of calls, since the first one needs to be
    * opened in a hugetlbfs mount point whereas the second needs to be a "classical" file. */
   if(use_huge_page && smpi_shared_malloc_bogusfile_huge_page == -1) {
-    const char *const array[] = {huge_page_mount_point, "simgrid-shmalloc-XXXXXX", nullptr};
-    char *huge_page_filename = xbt_str_join_array(array, "/");
+    char* huge_page_filename               = bprintf("%s/simgrid-shmalloc-XXXXXX", huge_page_mount_point);
     smpi_shared_malloc_bogusfile_huge_page = mkstemp(huge_page_filename);
     XBT_DEBUG("bogusfile_huge_page: %s\n", huge_page_filename);
     unlink(huge_page_filename);