Scroll to navigation

PMIX_INFO_GET_SIZE(3) OpenPMIx PMIX_INFO_GET_SIZE(3)

PMIx_Info_get_size — Compute the size (in bytes) of the data payload in a pmix_info_t(5) <#man5-pmix-info-t> structure.

SYNOPSIS

#include <pmix.h>
pmix_status_t PMIx_Info_get_size(const pmix_info_t *val,

size_t *size);


INPUT PARAMETERS

•
val: Pointer to the pmix_info_t(5) <#man5-pmix-info-t> whose payload size is to be computed.

OUTPUT PARAMETERS

•
size: Pointer to a size_t variable where the computed size, in bytes, will be returned.

DESCRIPTION

Compute and return the size, in bytes, of the data payload contained in a pmix_info_t(5) <#man5-pmix-info-t> structure. A pmix_info_t(5) <#man5-pmix-info-t> associates a key string with a pmix_value_t(5) <#man5-pmix-value-t>, so the returned size accounts for both components:

  • The size of the contained pmix_value_t(5) <#man5-pmix-value-t> payload, computed as described for PMIx_Value_get_size(3) <#man3-pmix-value-get-size>.
  • The length of the key string, up to PMIX_MAX_KEYLEN characters, including the terminating NULL where present.

The size of the pmix_info_t(5) <#man5-pmix-info-t> structure itself is also added, so size reflects the total storage associated with the info, not just its payload.

The source pmix_info_t(5) <#man5-pmix-info-t> is not altered by this function.

RETURN VALUE

Returns PMIX_SUCCESS on success. On error, a negative value corresponding to a PMIx error constant is returned, including:

•
PMIX_ERR_UNKNOWN_DATA_TYPE — the type field of the contained value is PMIX_UNDEF or otherwise not a recognized PMIx data type, so the size could not be computed.

Any other negative value indicates an appropriate error condition. PMIx error constants are defined in pmix_common.h.

NOTES

The returned size includes the size of the pmix_info_t(5) <#man5-pmix-info-t> structure itself, the length of its key, and the size of its contained pmix_value_t(5) <#man5-pmix-value-t> payload. The value payload is sized by delegating to PMIx_Value_get_size(3) <#man3-pmix-value-get-size>.

See also:

PMIx_Value_get_size(3) <#man3-pmix-value-get-size>, pmix_info_t(5) <#man5-pmix-info-t>, pmix_value_t(5) <#man5-pmix-value-t>


Copyright

2014-2026, OpenPMIx Community

September 27, 2026