table of contents
- unstable 7.0.0~rc1-1
| PMIX_APP_CREATE(3) | OpenPMIx | PMIX_APP_CREATE(3) |
PMIx_App_create — Allocate and initialize an array of pmix_app_t(5) <#man5-pmix-app-t> structures.
SYNOPSIS¶
#include <pmix.h> pmix_app_t* PMIx_App_create(size_t n);
Python Syntax¶
No Python equivalent
INPUT PARAMETERS¶
- •
- n: Number of pmix_app_t(5) <#man5-pmix-app-t> structures to allocate.
DESCRIPTION¶
Allocate a contiguous array of n pmix_app_t <#man5-pmix-app-t> structures from the heap and initialize (construct) each element so that all of its fields are zeroed. The returned array is owned by the caller and must be released with PMIx_App_free(3) <#man3-pmix-app-free> (passing the same count n).
RETURN VALUE¶
Returns a pointer to the newly allocated array of pmix_app_t structures on success. Returns NULL if n is zero or if the allocation fails.
NOTES¶
PMIx_App_create both allocates and constructs its elements, so it must be paired with PMIx_App_free(3) <#man3-pmix-app-free> (or, for a single-element allocation, PMIx_App_release(3) <#man3-pmix-app-release>), which destructs the contents and frees the array storage. Do not pass a created array to PMIx_App_destruct(3) <#man3-pmix-app-destruct> alone, as that would release the payload without freeing the array itself.
EXAMPLES¶
Create an array of three app structures:
pmix_app_t *apps; apps = PMIx_App_create(3); if (NULL == apps) {
/* handle allocation failure */ } /* ... populate apps[0..2] ... */ PMIx_App_free(apps, 3);
See also:
Copyright¶
2014-2026, OpenPMIx Community
| September 27, 2026 |