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

[CM] Improve memory allocation with buffer variables #1801

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

saikishor
Copy link
Member

This PR tries to address the issue of memory allocation in the RT loop of the CM read, write, and update cycles

Copy link

codecov bot commented Oct 17, 2024

Codecov Report

Attention: Patch coverage is 97.14286% with 1 line in your changes missing coverage. Please review.

Project coverage is 88.03%. Comparing base (52a2ffd) to head (58386ae).

Files with missing lines Patch % Lines
.../include/controller_manager/controller_manager.hpp 92.30% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1801      +/-   ##
==========================================
+ Coverage   87.97%   88.03%   +0.05%     
==========================================
  Files         121      121              
  Lines       13232    13209      -23     
  Branches     1195     1191       -4     
==========================================
- Hits        11641    11628      -13     
+ Misses       1149     1141       -8     
+ Partials      442      440       -2     
Flag Coverage Δ
unittests 88.03% <97.14%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
controller_manager/src/controller_manager.cpp 75.59% <100.00%> (-0.34%) ⬇️
.../include/controller_manager/controller_manager.hpp 96.77% <92.30%> (-3.23%) ⬇️

... and 3 files with indirect coverage changes

Copy link
Contributor

@fmauch fmauch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems fair. Is there a reason that you went for a quite large number to reserve memory for?

@gavanderhoorn
Copy link

Question: would using an RT-safe memory allocator not be a more scalable approach?

Copy link
Contributor

mergify bot commented Oct 17, 2024

This pull request is in conflict. Could you fix it @saikishor?

@saikishor
Copy link
Member Author

This seems fair. Is there a reason that you went for a quite large number to reserve memory for?

Good question, the part of the vectors I can reduce it. For the part of the string, I think we will need it, when you have a large setup and it helps when concatenating strings

@saikishor
Copy link
Member Author

Question: would using an RT-safe memory allocator not be a more scalable approach?

@gavanderhoorn Sure, I wanted to keep it simple and isolated, so it's easier for others. No big reason apart from that. Let me know what you think

@saikishor saikishor force-pushed the improve/memory_allocation/buffer_variables branch from d4e8050 to 40aa1a4 Compare October 27, 2024 18:58
@bmagyar
Copy link
Member

bmagyar commented Oct 31, 2024

Question: would using an RT-safe memory allocator not be a more scalable approach?

Do you have some pointers for us? (no pun intended! :D )

@saikishor
Copy link
Member Author

@gavanderhoorn do you have any pointers to improve this approach?

@saikishor saikishor force-pushed the improve/memory_allocation/buffer_variables branch from 13562b8 to 29bd486 Compare December 17, 2024 08:30
@saikishor saikishor force-pushed the improve/memory_allocation/buffer_variables branch from 29bd486 to 58386ae Compare December 23, 2024 15:59
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.

4 participants