-/*
- * When nb_shared_blocks == -1, default behavior of smpi_shared_malloc: everything is shared.
- * Otherwise, only the blocks described by shared_block_offsets are shared.
- * This array contains the offsets (in bytes) of the block to share.
- * Even indices are the start offsets (included), odd indices are the stop offsets (excluded).
- * For instance, if shared_block_offsets == {27, 42}, then the elements mem[27], mem[28], ..., mem[41] are shared. The others are not.
- */
-static void *smpi_shared_malloc_global(size_t size, const char *file, int line, size_t *shared_block_offsets=NULL, int nb_shared_blocks=-1) {
- size_t tmp_shared_block_offsets[2];
- if(nb_shared_blocks == -1) {
- nb_shared_blocks = 1;
- shared_block_offsets = tmp_shared_block_offsets;
- shared_block_offsets[0] = 0;
- shared_block_offsets[1] = size;
- }
- return smpi_shared_malloc_partial(size, shared_block_offsets, nb_shared_blocks);
-}
-