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

avoid redundant memory allocations in wait_for_work #5

Closed
wjwwood opened this issue Sep 4, 2014 · 3 comments
Closed

avoid redundant memory allocations in wait_for_work #5

wjwwood opened this issue Sep 4, 2014 · 3 comments
Assignees

Comments

@wjwwood
Copy link
Member

wjwwood commented Sep 4, 2014

This function, wait_for_work which is in the rclcpp::Executor class:

repeatedly malloc's for temporary storage used in the ros_middleware_interface::wait function.

This could be avoided either by only allocating memory when resizing of the structures is required or by always using a structure of the maximum possible size (still would need to be updated when nodes are added or removed but less frequently) and ensuring that the ros_middleware_interface::wait function properly handles the extra, unused storage.

@wjwwood wjwwood added backlog and removed enhancement New feature or request labels Feb 24, 2015
@jacquelinekay
Copy link
Contributor

This was resolved by #56, correct?

@wjwwood
Copy link
Member Author

wjwwood commented Jul 22, 2015

I don't think so because we still malloc and free each time we go through the loop. I think to resolve this ticket we need to have the default memory strategy only malloc or realloc when there is not enough space, otherwise reusing memory already allocated.

@jacquelinekay jacquelinekay self-assigned this Oct 14, 2015
@jacquelinekay jacquelinekay added the in progress Actively being worked on (Kanban column) label Oct 14, 2015
@jacquelinekay jacquelinekay added in review Waiting for review (Kanban column) and removed in progress Actively being worked on (Kanban column) labels Oct 14, 2015
@jacquelinekay
Copy link
Contributor

Fixed by #129

@jacquelinekay jacquelinekay removed the in review Waiting for review (Kanban column) label Oct 15, 2015
mauropasse referenced this issue in mauropasse/rclcpp Mar 16, 2020
Collect entities when a new node entity is added/removed
alsora pushed a commit to alsora/rclcpp that referenced this issue Oct 13, 2020
add missing predicate to event_queue_cv wait
alsora pushed a commit to alsora/rclcpp that referenced this issue Jan 15, 2021
nuclearsandwich pushed a commit that referenced this issue Mar 5, 2021
A couple more doc fixes from review comments
nnmm pushed a commit to ApexAI/rclcpp that referenced this issue Jul 9, 2022
refactor rcl into a functional library
asymingt added a commit to asymingt/rclcpp that referenced this issue Aug 2, 2022
Signed-off-by: Andrew Symington <[email protected]>
DensoADAS pushed a commit to DensoADAS/rclcpp that referenced this issue Aug 5, 2022
ivanpauno pushed a commit to asymingt/rclcpp that referenced this issue Aug 26, 2022
Signed-off-by: Andrew Symington <[email protected]>
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

No branches or pull requests

3 participants