Scroll to navigation

PMIX_REGATTR_CREATE(3) OpenPMIx PMIX_REGATTR_CREATE(3)

PMIx_Regattr_create — Allocate and initialize an array of pmix_regattr_t(5) <#man5-pmix-regattr-t> structures.

SYNOPSIS

#include <pmix.h>
pmix_regattr_t* PMIx_Regattr_create(size_t n);


Python Syntax

No Python equivalent

INPUT PARAMETERS

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

DESCRIPTION

Allocate a contiguous array of n pmix_regattr_t <#man5-pmix-regattr-t> structures on the heap and initialize each element by calling PMIx_Regattr_construct(3) <#man3-pmix-regattr-construct> on it. The returned array is owned by the caller and must eventually be released with PMIx_Regattr_free(3) <#man3-pmix-regattr-free> (passing the same count n).

If n is zero, no allocation is performed and NULL is returned.

RETURN VALUE

Returns a pointer to the newly allocated and initialized array of pmix_regattr_t structures, or NULL if n is zero or the allocation fails.

NOTES

The PMIX_REGATTR_CREATE convenience macro is a direct wrapper for this function; it assigns the returned pointer to its first argument.

EXAMPLES

Create, load, and free an array of registration-attribute structures:

pmix_regattr_t *attrs;
attrs = PMIx_Regattr_create(1);
PMIx_Regattr_load(&attrs[0], "PMIX_TIMEOUT",

PMIX_TIMEOUT, PMIX_INT,
"Time in seconds before the operation times out"); /* ... use attrs ... */ PMIx_Regattr_free(attrs, 1);


See also:

PMIx_Regattr_construct(3) <#man3-pmix-regattr-construct>, PMIx_Regattr_destruct(3) <#man3-pmix-regattr-destruct>, PMIx_Regattr_free(3) <#man3-pmix-regattr-free>, PMIx_Regattr_load(3) <#man3-pmix-regattr-load>, PMIx_Regattr_xfer(3) <#man3-pmix-regattr-xfer>, pmix_regattr_t(5) <#man5-pmix-regattr-t>


Copyright

2014-2026, OpenPMIx Community

November 5, 2026