-
Notifications
You must be signed in to change notification settings - Fork 18
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
The result of deep_size_of_interned
is incorrect
#51
Comments
I won't have time to look at your pull request soon, but wanted to mention
that you'll need to make sure to use the tricky "Context" to ensure that
the same data doesn't get counted twice, if a data structure has two
interned pointers to the same value.
David Roundy
…On Wed, Jun 19, 2024, 6:10 AM Gmry ***@***.***> wrote:
#52 <#52>
—
Reply to this email directly, view it on GitHub
<#51 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABBSKN6U6C5UYOE3224WPDZIF7LLAVCNFSM6AAAAABJR3NRG6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZYGY4DKNZZG4>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
The |
fix `deep_size_of_interned` always returns a fixed value (close #51)
The crate
deepsize
implementsDeepSizeOf
trait for all references. And it only calculates the size of the reference itself, not the size of the pointed-to object.https://github.com/Aeledfyr/deepsize/blob/5deebe687695610e6038dc70753defbe7634d549/src/lib.rs#L421-L444
Therefore, we must manually dereference before calling
deep_size_of
.internment/src/intern.rs
Line 79 in 1eb3a80
The text was updated successfully, but these errors were encountered: