Skip to content

avoid redundant memory allocations in wait_for_work #5

Description

@wjwwood

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions