18.2.191. PMIx_Topology_construct
PMIx_Topology_construct — Initialize a caller-provided
pmix_topology_t(5) structure.
18.2.191.1. SYNOPSIS
#include <pmix.h>
void PMIx_Topology_construct(pmix_topology_t *t);
18.2.191.1.1. Python Syntax
No Python equivalent
18.2.191.2. INPUT PARAMETERS
t: Pointer to the pmix_topology_t(5) structure to be initialized. The storage for the structure itself must already exist — it is supplied by the caller (typically declared on the stack or embedded within another object).
18.2.191.3. DESCRIPTION
Initialize the memory of a pmix_topology_t that
the caller has already allocated. The function zeroes the entire structure,
clearing the source string pointer and the topology pointer.
No heap memory is allocated and no topology object is attached; the caller is responsible for populating the fields after construction.
18.2.191.4. RETURN VALUE
PMIx_Topology_construct returns no value (void).
18.2.191.5. NOTES
Because PMIx_Topology_construct operates on caller-provided storage, it must
be paired with PMIx_Topology_destruct(3)
to release any payload the structure subsequently acquires. Do not pass a
constructed (as opposed to created) structure to PMIx_Topology_free(3), as that would attempt to free storage the library
did not allocate.
An equivalent static initializer, PMIX_TOPOLOGY_STATIC_INIT, is available
for initializing a structure at the point of declaration.
18.2.191.6. EXAMPLES
Construct a structure:
pmix_topology_t topo;
PMIx_Topology_construct(&topo);