## upc_global_alloc

#### Synopsis

        #include <upc.h>
        shared void *upc_global_alloc(size_t nblocks,
                                      size_t nbytes);

#### Description

The `upc_global_alloc` allocates shared space compatible with the declaration:

`shared [nbytes] char[nblocks * nbytes]`

`upc_global_alloc` function is not a collective function. If called by multiple threads, all threads which make the call get different allocations. If `nblocks*nbytes` is zero, the result is a null pointer-to-shared.

Terms, definitions, and symbols

Back to index of all UPC functions