You are here: Part 3: Advanced Concepts > DDS Sample-Data and Instance-Data Memory Management > DDS Sample-Data Memory Management for DataWriters

DDS Sample-Data Memory Management for DataWriters

To configure DDS sample-data memory management on the writer side, use the PROPERTY QosPolicy (DDS Extension) . lists the supported memory-management properties for DataWriters.

DDS Sample-Data Memory Management Properties for DataWriters

Property

Description

dds.data_writer.
history.memory_manager.
fast_pool.pool_buffer_max_size

If the serialized size of the DDS sample is <= pool_buffer_max_size:
The buffer is obtained from a pre-allocated pool and released when the DataWriter is deleted.

If the serialized size of the DDS sample is > pool_buffer_max_size:
The buffer is dynamically allocated from the heap and returned to the heap when the DDS sample is removed from the DataWriter’s queue.

Default: -1 (UNLIMITED). All DDS sample buffers are obtained from the pre-allocated pool; the buffer size is the maximum serialized size of the DDS samples, as returned by the type plugin get_serialized_sample_max_size() operation.

See Memory Management without Batching.

Note: This property also controls the memory allocation for the serialized key buffer that is stored with every instance. See Instance-Data Memory Management for DataWriters.

dds.data_writer.
history.memory_manager.
java_stream.min_size

Only supported when using the Java API.

Defines the minimum size of the buffer that will be used to serialize DDS samples.

When a DataWriter is created, the Java layer will allocate a buffer of this size and associate it with the DataWriter.

Default: -1 (UNLIMITED). This is a sentinel that refers to the maximum serialized size of a DDS sample, as returned by the type plugin get_serialized_sample_max_size() operation

See Writer-Side Memory Management when Using Java.

dds.data_writer.
history.memory_manager.
java_stream.trim_to_size

Only supported when using the Java API.

A boolean value that controls the growth of the serialization buffer.

If set to 0 (default): The buffer will not be reallocated unless the serialized size of a new DDS sample is greater than the current buffer size.

If set to 1: The buffer will be reallocated with each new DDS sample to a smaller size in order to just fit the DDS sample serialized size. The new size cannot be smaller than min_size.

See Writer-Side Memory Management when Using Java.

© 2016 RTI