upc_free
- Date:
03-29-2013
NAME
upc_free - Frees dynamically allocated shared storage
SYNOPSIS
#include <upc.h>
void upc_free(shared void *ptr);
IMPLEMENTATION
Cray Linux Environment (CLE)
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 returned earlier by upc_alloc, upc_global_alloc, or upc_all_alloc; or if the space has been deallocated by a previous call by any thread to upc_free, the behavior is undefined.
Note: While upc_all_alloc is a collective function, upc_free is not. Only one UPC thread should call upc_free to deallocate memory. If multiple UPC threads attempt to call upc_free to deallocate the same memory, a runtime error results.
SEE ALSO
upc_all_alloc(3c), upc_all_free(3c), upc_alloc(3c), upc_global_alloc(3c)