Scroll to navigation

PMIX_VALUE_CONSTRUCT(3) OpenPMIx PMIX_VALUE_CONSTRUCT(3)

PMIx_Value_construct — Initialize a caller-provided pmix_value_t(5) <#man5-pmix-value-t> structure.

SYNOPSIS

#include <pmix.h>
void PMIx_Value_construct(pmix_value_t *val);


Python Syntax

No Python equivalent

INPUT PARAMETERS

•
val: Pointer to the pmix_value_t(5) <#man5-pmix-value-t> 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).

DESCRIPTION

Initialize the memory of a pmix_value_t(5) <#man5-pmix-value-t> that the caller has already allocated. The function zeroes the entire structure and sets the type field to PMIX_UNDEF. No heap memory is allocated and no data payload is attached.

A value must be constructed (or created with PMIx_Value_create(3) <#man3-pmix-value-create>) before it is passed to any load, transfer, or compare operation; using an uninitialized value produces undefined behavior.

Because PMIx_Value_construct operates on caller-provided storage, it must be paired with PMIx_Value_destruct(3) <#man3-pmix-value-destruct> to release any payload the value subsequently acquires. Do not pass a constructed (as opposed to created) value to PMIx_Value_free(3) <#man3-pmix-value-free>, as that would attempt to free storage the library did not allocate.

RETURN VALUE

PMIx_Value_construct returns no value (void).

NOTES

PMIx_Value_construct is an OpenPMIx convenience routine. The corresponding macro-style interface for this operation is PMIX_VALUE_CONSTRUCT.

EXAMPLES

Construct a structure:

pmix_value_t val;
PMIx_Value_construct(&val);


See also:

PMIx_Value_destruct(3) <#man3-pmix-value-destruct>, PMIx_Value_create(3) <#man3-pmix-value-create>, PMIx_Value_free(3) <#man3-pmix-value-free>, PMIx_Value_load(3) <#man3-pmix-value-load>, PMIx_Value_xfer(3) <#man3-pmix-value-xfer>, pmix_value_t(5) <#man5-pmix-value-t>


Copyright

2014-2026, OpenPMIx Community

November 5, 2026