Function heapsize::heap_size_of
source · [−]Expand description
Get the size of a heap block.
Ideally Rust would expose a function like this in std::rt::heap.
unsafe
because the caller must ensure that the pointer is from jemalloc.
FIXME: This probably interacts badly with custom allocators:
https://doc.rust-lang.org/book/custom-allocators.html