Scroll to navigation

PMIX_NODE_PID_CREATE(3) OpenPMIx PMIX_NODE_PID_CREATE(3)

PMIx_Node_pid_create — Allocate and initialize an array of pmix_node_pid_t(5) <#man5-pmix-node-pid-t> structures.

SYNOPSIS

#include <pmix.h>
pmix_node_pid_t* PMIx_Node_pid_create(size_t n);


Python Syntax

No Python equivalent

INPUT PARAMETERS

•
n: Number of pmix_node_pid_t(5) <#man5-pmix-node-pid-t> structures to allocate in the array.

DESCRIPTION

Allocate a contiguous array of n pmix_node_pid_t <#man5-pmix-node-pid-t> structures on the heap and construct (initialize) each element as if by PMIx_Node_pid_construct(3) <#man3-pmix-node-pid-construct>.

If n is zero, the function returns NULL without allocating. If the underlying allocation fails, NULL is returned.

RETURN VALUE

Returns a pointer to the newly allocated, constructed array of pmix_node_pid_t structures, or NULL if n is zero or the allocation could not be satisfied.

NOTES

The returned array is owned by the caller and must be released with PMIx_Node_pid_free(3) <#man3-pmix-node-pid-free>, passing the same count n that was used to create it. PMIx_Node_pid_free both destructs the contents of each element and frees the array storage itself.

EXAMPLES

Create and later free an array:

pmix_node_pid_t *array;
array = PMIx_Node_pid_create(4);
if (NULL == array) {

/* handle allocation failure */ } /* ... use the array ... */ PMIx_Node_pid_free(array, 4);


See also:

PMIx_Node_pid_free(3) <#man3-pmix-node-pid-free>, PMIx_Node_pid_construct(3) <#man3-pmix-node-pid-construct>, PMIx_Node_pid_destruct(3) <#man3-pmix-node-pid-destruct>, pmix_node_pid_t(5) <#man5-pmix-node-pid-t>


Copyright

2014-2026, OpenPMIx Community

September 27, 2026