Function dds_loan_shared_memory_buffer

Function Documentation

dds_return_t dds_loan_shared_memory_buffer(dds_entity_t writer, size_t size, void **buffer)

Loan a shared memory buffer of a specific size from the writer.

Note

Currently this function is to be used with dds_writecdr by adding the loaned buffer to serdata as iox_chunk.

Note

The function can only be used if dds_is_shared_memory_available is true for the writer.

Parameters
  • writer[in] the writer to loan the buffer from

  • size[in] the requested buffer size

  • buffer[out] the loaned buffer

Returns

DDS_RETCODE_OK if successful, DDS_RETCODE_ERROR otherwise