RTI Connext .Net APIs
Version 6.0.1
|
This number controls how much memory is allocated by the plugin for the receive queue. The actual number of bytes allocated is:
where fixedOverhead
is some small number of bytes used by the queue data structure. The following rules are noted:
receive_buffer_size
<
message_size_max
*
received_message_count_max
, then the transport plugin will not be able to store received_message_count_max
messages of size message_size_max
. receive_buffer_size
>
message_size_max
*
received_message_count_max
, then there will be memory allocated that cannot be used by the plugin and thus wasted. To optimize memory usage, the user is allowed to specify a size for the receive queue to be less than that required to hold the maximum number of messages which are all of the maximum size.
In most situations, the average message size may be far less than the maximum message size. So for example, if the maximum message size is 64 K bytes, and the user configures the plugin to buffer at least 10 messages, then 640 K bytes of memory would be needed if all messages were 64 K bytes. Should this be desired, then receive_buffer_size
should be set to 640 K bytes.
However, if the average message size is only 10 K bytes, then the user could set the receive_buffer_size
to 100 K bytes. This allows the user to optimize the memory usage of the plugin for the average case and yet allow the plugin to handle the extreme case.
NOTE, the queue will always be able to hold 1 message of message_size_max
bytes, no matter what the value of receive_buffer_size
is.