-
Notifications
You must be signed in to change notification settings - Fork 339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zero copy api #394
zero copy api #394
Conversation
How does the loaning apply to a dynamic size message like |
We should highlight this a little bit stronger in the design doc, but essentially it's the middleware's task to declare whether or not it can loan messages of a certain message type. If yes (for example for fixed sized arrays or POD), the memory for the loaned message is allocated by the middleware. If not, the loaned message is using an alternatively provided instance of an allocator. The idea is that if the middleware doesn't support message loaning, the user should be able to control the allocation. The logic is implemented here: https://github.com/ros2/rclcpp/pull/864/files#diff-8c68c968941e2e05ba8974455ea3f1b5R73-R74 Independent of the middleware, the user code should always work (whether it is zero-copy or not). |
554a4a2
to
2502ee8
Compare
Signed-off-by: Karsten Knese <karsten@openrobotics.org>
Signed-off-by: Karsten Knese <karsten@openrobotics.org>
Signed-off-by: Karsten Knese <karsten@openrobotics.org>
2502ee8
to
620527a
Compare
Signed-off-by: Karsten Knese <karsten@openrobotics.org>
Signed-off-by: Karsten Knese <karsten@openrobotics.org>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
connects to ros2/ros2#785
Signed-off-by: Karsten Knese karsten@openrobotics.org