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

Add differential memory usage tracking #51

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

Conversation

michaelsproul
Copy link
Member

Implement a much-thought-about feature to track the differential size of multiple data structures stored using structural sharing!

This PR is still WIP. There are probably some improvements we'll want before merging.

let post_stats = dhat::HeapStats::get();
let dhat_total_size = post_stats.curr_bytes - pre_stats.curr_bytes;

dhat::assert_eq!(dhat_total_size, stats.total_size);

Choose a reason for hiding this comment

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

Really neat test! Have you tried nested Lists?

Copy link
Member Author

Choose a reason for hiding this comment

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

no, because I know it won't work 😳

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