18.2.127. PMIx_Info_persistent
PMIx_Info_persistent — Mark a pmix_info_t(5) as persistent
18.2.127.1. SYNOPSIS
#include <pmix.h>
void PMIx_Info_persistent(pmix_info_t *p);
18.2.127.1.1. Python Syntax
No Python equivalent
18.2.127.2. INPUT PARAMETERS
p: Pointer to the pmix_info_t(5) structure to be marked persistent.
18.2.127.3. DESCRIPTION
The PMIx_Info_persistent function sets the PMIX_INFO_PERSISTENT directive
bit in the info structure’s flags field. A persistent info is understood not
to own the pmix_value_t(5) payload it carries, so the
library will not release that value on the info’s behalf.
This flag changes the behavior of the info lifecycle routines:
PMIx_Info_destruct(3) and PMIx_Info_free(3) leave the contained value untouched instead of releasing it.
PMIx_Info_xfer(3) copies the value by shallow structure assignment (the destination shares the source’s underlying value memory) rather than deep-copying it.
Use this flag when the value memory is owned elsewhere and must outlive the info structure, to avoid a double free. Whether an info is currently persistent can be tested with PMIx_Info_is_persistent(3).
18.2.127.4. RETURN VALUE
PMIx_Info_persistent returns no value (void).
18.2.127.5. NOTES
PMIx_Info_persistent is the OpenPMIx routine underlying the historical
PMIX_INFO_SET_PERSISTENT macro. That macro is retained in
pmix_deprecated.h for backward compatibility and simply expands to a call to
this function.
Info structures default to non-persistent at construction, which the surrounding source notes is retained “for historical reasons”: the library owns and releases the contained value unless this flag is explicitly set.