-
Notifications
You must be signed in to change notification settings - Fork 235
Fix malloc_size_of for mac #93
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
Conversation
(it is the less impacting approach).
`get_malloc_size_src.sh`. Add missing impls.rs with ethereum types related implementation.
Fix a no_std deps issue.
Documentation enhancements. Explicits imports.
Co-Authored-By: cheme <[email protected]>
Add malloc_size_of impl.
I would personally go for a breaking change approach (I guess |
I did not see uint 0.6.0 published on crates.io, so it is probably fine not to increment. For patricia_trie the dependency is a test dependency, so I think there is no need. |
can activate prefix with feature).
Since memory-db and patriciatrie has moved to |
Just discovered https://github.com/Aeledfyr/deepsize (similar to estimate-heapsize), although it seems to be unmaintained. |
This PR changes the way macos is handled by malloc_size of (in #89 the test was not activated and I did not see the failure for macos).
When no allocator is set macos will use estimate-heapsize (the tests are pretty bad looking but I did not find a better alternative).
Note that I would rather call the system allocator but did not know if the equivalent of 'malloc_size' is exposed anywhere.
If jemalloc is set macos will use jemalloc sizeof (this is the target for parity ethereum).
This PR also allows usage of
MallocSizeOf
trait onMemoryDB
and mark oldmem_used
method as deprecated.The related future changes for parity-ethereum would be : openethereum/parity-ethereum@master...cheme:rem_heapsize .