Function dds_data_allocator_init

Function Documentation

dds_return_t dds_data_allocator_init(dds_entity_t entity, dds_data_allocator_t *data_allocator)

Initialize an object for performing allocations/frees in the context of a reader/writer.

The operation will fall back to standard heap allocation if nothing better is available.

Parameters
  • entity[in] the handle of the entity

  • data_allocator[out] opaque allocator object to initialize

Return values
  • DDS_RETCODE_OK – the allocator object was successfully initialized

  • DDS_RETCODE_BAD_PARAMETER – entity is invalid, data_allocator is a null pointer

  • DDS_RETCODE_PRECONDITION_NOT_MET – Cyclone DDS is not initialized

  • DDS_RETCODE_ILLEGAL_OPERATION – operation not supported on this entity

Returns

success or a generic error indication