blob: 8373525d9570c0f443fc4736cff46d9d51963407 [file] [log] [blame]
<h2 >upc_global_alloc</h2>
<h4>Synopsis</h4>
<p>
<pre>
#include &lt;upc.h&gt;
shared void *upc_global_alloc(size_t nblocks,
size_t nbytes);
</pre>
<p>
<h4>Description</h4>
<p>
The <code>upc_global_alloc</code> allocates shared space compatible with the declaration:
<p>
<code>
shared [nbytes] char[nblocks * nbytes]</code>
<p>
<code>upc_global_alloc</code> function is not a collective function. If called by
multiple threads, all threads which make the call get different allocations. If
<code>nblocks*nbytes</code> is zero, the result is a null pointer-to-shared.
<p>&nbsp
<p>&nbsp
<p><a href="terms.html">Terms, definitions, and symbols</a><br>
<p><a href="index.html">Back to index of all UPC functions</a>