Scroll to navigation

PMIX_ENDPOINT_CREATE(3) OpenPMIx PMIX_ENDPOINT_CREATE(3)

PMIx_Endpoint_create — Allocate and initialize an array of pmix_endpoint_t(5) <#man5-pmix-endpoint-t> structures.

SYNOPSIS

#include <pmix.h>
pmix_endpoint_t* PMIx_Endpoint_create(size_t n);


Python Syntax

No Python equivalent

INPUT PARAMETERS

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

DESCRIPTION

Allocate a contiguous array of n pmix_endpoint_t <#man5-pmix-endpoint-t> structures on the heap and construct each element, as though PMIx_Endpoint_construct(3) <#man3-pmix-endpoint-construct> had been called on every member (uuid and osname set to NULL and the embedded endpt byte object zeroed).

The returned array is owned by the caller and must eventually be released with PMIx_Endpoint_free(3) <#man3-pmix-endpoint-free>, which destructs the contents of each element and frees the array storage.

RETURN VALUE

Returns a pointer to the newly allocated array of pmix_endpoint_t <#man5-pmix-endpoint-t> structures, or NULL if n is zero or the allocation fails.

EXAMPLES

Create and later release an array of endpoint structures:

pmix_endpoint_t *eps;
eps = PMIx_Endpoint_create(2);
if (NULL == eps) {

/* handle allocation failure */ } /* ... populate and use the array ... */ PMIx_Endpoint_free(eps, 2);


See also:

PMIx_Endpoint_free(3) <#man3-pmix-endpoint-free>, PMIx_Endpoint_construct(3) <#man3-pmix-endpoint-construct>, PMIx_Endpoint_destruct(3) <#man3-pmix-endpoint-destruct>, pmix_endpoint_t(5) <#man5-pmix-endpoint-t>


Copyright

2014-2026, OpenPMIx Community

November 5, 2026