Skip to content

Commit

Permalink
Refs #22841. Change calculation of mean_message_size.
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Company <[email protected]>
  • Loading branch information
MiguelCompany committed Feb 28, 2025
1 parent 2c797ba commit 08c2656
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cpp/rtps/transport/shared_mem/SharedMemTransport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,8 @@ bool SharedMemTransport::init(
{
return false;
}
uint32_t mean_message_size = configuration_.max_message_size() / 2;
constexpr uint32_t mean_message_size =
shm_default_segment_size / SharedMemTransportDescriptor::shm_default_port_queue_capacity;
uint32_t max_allocations = configuration_.segment_size() / mean_message_size;
if (configuration_.port_queue_capacity() > max_allocations)
{
Expand Down

0 comments on commit 08c2656

Please sign in to comment.