blob: 1dbf67927ac63979732f8fdaf77770226a224b06 [file] [log] [blame]
<h2 >The <code>upc_free</code> function </h2>
<h4>Synopsis</h4>
<pre>
#include &lt;upc.h&gt;
void upc_free(shared void *ptr);
</pre>
<p>
<h4>Description</h4>
<p>
The <code>upc_free </code> function frees the dynamically allocated shared storage pointed
to by <code>ptr</code>. If <code>ptr</code> is a null pointer, no action occurs. Otherwise, if the
argument does not match a pointer earlier returned by the
<a href="upc_alloc.html"><code>upc_alloc</code></a>,
<a href="upc_global_alloc.html"><code>upc_global_alloc</code></a>,
<a href="upc_all_alloc.html"><code>upc_all_alloc</code></a>, or
<a href="upc_local_alloc.html"><code>upc_local_alloc</code></a>
function, or if the
space has been deallocated by a previous call, by any thread
(i.e., only one thread may call <code>upc_free </code> for each allocation),
to <code>upc_free</code>,
the behavior is undefined.
<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>