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

[YARP_OS] add hooks for checking heap allocation in regression tests #365

Merged
merged 1 commit into from
Jan 20, 2015

Conversation

paulfitz
Copy link
Member

This is some support for memory checks I'll be adding in later PRs, basically adding tests that yarp does not allocate memory during performance-sensitive operations.

It relies on overriding new/delete. This appears to conflict with something ACE is doing. Reserving these tests for a no-ace build is fine for my purposes. None of this code will be run unless YARP is compiled with a special YARP_TEST_HEAP flag (marked as advanced).

@coveralls
Copy link

Coverage Status

Coverage increased (+0.28%) when pulling eb77c48 on paulfitz:alloc_test into 6aa0683 on robotology:master.

lornat75 added a commit that referenced this pull request Jan 20, 2015
[YARP_OS] add hooks for checking heap allocation in regression tests
@lornat75 lornat75 merged commit 092a784 into robotology:master Jan 20, 2015
@drdanz
Copy link
Member

drdanz commented Jan 20, 2015

@paulfitz what about malloc/free allocation? There are a few around YARP_OS, it might be worth checking for these as well...

@paulfitz
Copy link
Member Author

@drdanz I did look at catching malloc/free but the easy-to-do method was deprecated and the blessed method was more awkward than I wanted to get into. However maybe I missed something. It seemed easier to remove any malloc/frees in the code I'll be testing (I don't think there are any in those parts but will check)

@paulfitz paulfitz deleted the alloc_test branch January 20, 2015 15:30
@drdanz
Copy link
Member

drdanz commented Jan 28, 2015

@paulfitz Have you seen this?
Also this tool (Heaptrack) looks interesting.

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