-
Notifications
You must be signed in to change notification settings - Fork 58
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
Memory Usage for Debugging #57
Comments
Hi @fredfortier. There's no simple way to get those numbers. I can imagine a custom allocator that keeps track of which functions allocate memory. If you want to go a bit more intrusive and modify rpds you can traverse the tree of the data structure you want to inspect and sum all sizes together. Keep in mind that most persistent data structures keep a fair amount of extra data, so I expect the memory overhead to be significant for most data structures. |
Any simple formula I can use to compute an estimated size? I don't need precise measurements. If I can make some assumptions, like treat them all as uncolored binary search tree, while remaining in the ballpark, it might be good enough for me. |
Which particular data structure are you trying to get the memory usage of? |
These here: |
What is a good way to get the current memory usage of a rpds structure? I'm looking for something like Servo's
malloc_size_of
. I can get the size of leaves but I'm missing the size of branches. Or is it trivial to calculate it? Any recommendation would be appreciated.The text was updated successfully, but these errors were encountered: