apollo-platform icon indicating copy to clipboard operation
apollo-platform copied to clipboard

关于shared memory大小的问题

Open reed-lau opened this issue 7 years ago • 1 comments

初步看代码,人为每一个topic对应一个shared_memory,而且大小是fixed=queue_size*first_msg_size+etc,如果msg每次数据大小不断变化,而且变化很大是不是会存不下queue_size个msg了?

reed-lau avatar Feb 02 '18 06:02 reed-lau

To use shared memory efficiently, we set default value according some rules related with single msg size and queue length. If msg size exceeds the existing msg block size, the pre-allocated shared memory will be re-allocated. You can find this logic at line 173-188 in source file "roscpp/src/publisher.cpp", thanks.

bjtulynn avatar Mar 14 '18 03:03 bjtulynn