* \ | |
* ----
*/
-#include <map>
+#include <array>
#include <cstring>
+#include <map>
#include "private.hpp"
#include "xbt/config.hpp"
return smpi_shared_malloc_local(size, file, line);
} else if (smpi_cfg_shared_malloc() == SharedMallocType::GLOBAL) {
int nb_shared_blocks = 1;
- size_t shared_block_offsets[2] = {0, size};
- return smpi_shared_malloc_partial(size, shared_block_offsets, nb_shared_blocks);
+ const std::array<size_t, 2> shared_block_offsets = {{0, size}};
+ return smpi_shared_malloc_partial(size, shared_block_offsets.data(), nb_shared_blocks);
}
XBT_DEBUG("Classic allocation of %zu bytes", size);
return ::operator new(size);