## The `upc_free` function

#### Synopsis

        #include <upc.h>
        void upc_free(shared void *ptr);

#### Description

The `upc_free` function frees the dynamically allocated shared storage pointed to by `ptr`. If `ptr` is a null pointer, no action occurs. Otherwise, if the argument does not match a pointer earlier returned by the `upc_alloc`, `upc_global_alloc`, `upc_all_alloc`, or `upc_local_alloc` function, or if the space has been deallocated by a previous call, by any thread (i.e., only one thread may call `upc_free` for each allocation), to `upc_free`, the behavior is undefined.

Terms, definitions, and symbols

Back to index of all UPC functions