Apollo: 共享内存使用定长Block,不会导致segment频繁recreate 和内存的大量浪费吗?

Created on 19 Mar 2019  ·  2Comments  ·  Source: ApolloAuto/apollo

  1. 共享内存使用定长Block,不会导致segment频繁recreate 和内存的大量浪费吗?
  2. 如果shm写速度很快, 读非常缓慢,是否会导致未读的block 被直接覆盖写呢?

We appreciate you go through Apollo documentations and search previous issues before creating an new one. If neither of the sources helped you with your issues, please report the issue using the following form. Please note missing info can delay the response time.

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 14.04):
  • Apollo installed from (source or binary):
  • Apollo version (1.0, 1.5, 2.0, 2.5, 3.0):

Steps to reproduce the issue:

  • Please use bullet points and include as much details as possible:

Supporting materials (screenshots, command lines, code/script snippets):

Cyber Help wanted

Most helpful comment

  1. 共享内存使用定长Block,不会导致segment频繁recreate 和内存的大量浪费吗?
  2. 如果shm写速度很快, 读非常缓慢,是否会导致未读的block 被直接覆盖写呢?

We appreciate you go through Apollo documentations and search previous issues before creating an new one. If neither of the sources helped you with your issues, please report the issue using the following form. Please note missing info can delay the response time.

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 14.04):
  • Apollo installed from (source or binary):
  • Apollo version (1.0, 1.5, 2.0, 2.5, 3.0):

Steps to reproduce the issue:

  • Please use bullet points and include as much details as possible:

Supporting materials (screenshots, command lines, code/script snippets):

Hi nelsonjin, thanks for your questions! The answers are listed as following:

  1. Firstly, we create shared memory areas only when there is interprocess communication. Secondly, the size of segment is related to the size of message, recreation only happens when the message grows too bigger.
  2. If the writing speed is faster than the reading speed, the unread block will be overwritten. In the current vehicle environment, there will be no case where the reading speed is slower than the writing speed.

Thanks again! Welcome to continue the discussion.

All 2 comments

  1. 共享内存使用定长Block,不会导致segment频繁recreate 和内存的大量浪费吗?
  2. 如果shm写速度很快, 读非常缓慢,是否会导致未读的block 被直接覆盖写呢?

We appreciate you go through Apollo documentations and search previous issues before creating an new one. If neither of the sources helped you with your issues, please report the issue using the following form. Please note missing info can delay the response time.

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 14.04):
  • Apollo installed from (source or binary):
  • Apollo version (1.0, 1.5, 2.0, 2.5, 3.0):

Steps to reproduce the issue:

  • Please use bullet points and include as much details as possible:

Supporting materials (screenshots, command lines, code/script snippets):

Hi nelsonjin, thanks for your questions! The answers are listed as following:

  1. Firstly, we create shared memory areas only when there is interprocess communication. Secondly, the size of segment is related to the size of message, recreation only happens when the message grows too bigger.
  2. If the writing speed is faster than the reading speed, the unread block will be overwritten. In the current vehicle environment, there will be no case where the reading speed is slower than the writing speed.

Thanks again! Welcome to continue the discussion.

Currently closing this issue. @nelsonjin if you have any additional questions, feel free to reopen it!

Was this page helpful?
0 / 5 - 0 ratings