Skip to content
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

Override get_rcl_allocator for TLSF allocators. #103

Open
wants to merge 2 commits into
base: rolling
Choose a base branch
from

Conversation

stevewolter
Copy link

@stevewolter stevewolter commented Oct 26, 2020

This removes one more user of the broken generic version of
get_rcl_allocator, which is causing
ros2/rclcpp#1254. This is a companion change to ros2/rclcpp#1324.

While there, fix the copy constructor for tslf_heap_allocator. Right now, the allocator keeps an owning ref to a memory pool, and the copy constructor makes a shallow copy of the reference. The first copy of the allocator to go out of scope will invalidate all copies. Instead, use a shared_ptr so that the last copy will clean up the memory pool.

Signed-off-by: Steve Wolter [email protected]

This removes one more user of the broken generic version of
get_rcl_allocator, which is causing
ros2/rclcpp#1254.

Signed-off-by: Steve Wolter <[email protected]>
@audrow audrow changed the base branch from master to rolling June 28, 2022 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants