table of contents
- unstable 7.0.0~rc1-1
| PMIX_PDATA_FREE(3) | OpenPMIx | PMIX_PDATA_FREE(3) |
PMIx_Pdata_free — Release an array of pmix_pdata_t(5) <#man5-pmix-pdata-t> structures allocated by PMIx_Pdata_create(3) <#man3-pmix-pdata-create>.
SYNOPSIS¶
#include <pmix.h> void PMIx_Pdata_free(pmix_pdata_t *p, size_t n);
Python Syntax¶
No Python equivalent
INPUT PARAMETERS¶
- p: Pointer to the array of pmix_pdata_t(5) <#man5-pmix-pdata-t> structures to be released.
- n: Number of structures in the array.
DESCRIPTION¶
Release an array of pmix_pdata_t <#man5-pmix-pdata-t> structures that was previously allocated by PMIx_Pdata_create(3) <#man3-pmix-pdata-create>. Each of the n elements is first destructed — releasing any memory held by its value field, as PMIx_Pdata_destruct(3) <#man3-pmix-pdata-destruct> would — and then the array storage itself is freed.
If p is NULL or n is zero, the function does nothing.
RETURN VALUE¶
PMIx_Pdata_free returns no value (void).
NOTES¶
Use PMIx_Pdata_free only on storage obtained from PMIx_Pdata_create(3) <#man3-pmix-pdata-create>. For a single structure provided by the caller (stack or embedded), use PMIx_Pdata_destruct(3) <#man3-pmix-pdata-destruct> instead, as PMIx_Pdata_free frees the array storage the library allocated.
The function does not modify the caller’s pointer; after the call the caller should discard or reset p to avoid using freed memory.
EXAMPLES¶
Allocate and free an array:
pmix_pdata_t *array; array = PMIx_Pdata_create(4); /* ... populate and use array ... */ PMIx_Pdata_free(array, 4); array = NULL;
See also:
Copyright¶
2014-2026, OpenPMIx Community
| September 27, 2026 |