-
Notifications
You must be signed in to change notification settings - Fork 20
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
Document differences from heapsize crate #2
Comments
Note also that |
@Aeledfyr In response to the release notes of 0.2.0, it seems the use case you intend to implement with deepsize is computing total dynamically allocated memory, to the exclusion of statically and automatically allocated memory? |
Currently it considers all memory that is directly owned (using Rust's ownership semantics). That means that single owner allocating objects, ie. Box and most collections, are included in the size, while normal references ( What do you specifically mean by "statically and automatically allocated memory"? It's also important to note that this is only and can only be an estimation; without hooking into the allocator it isn't possible to have perfect accuracy in measurements, especially with things like (I should probably write out a full justification of this in the docs, but I'm not entirely certain about all of it - there are other valid ways of dealing with reference counting or other shared memory) |
The
heapsize
crate is a popular crate with many crates depending on it and lots of downloads. From the description of deepsize, I can't tell what it would do differently than heapsize. It would be worth calling this out in the readme as well as rustdocs.@Aeledfyr
The text was updated successfully, but these errors were encountered: