Function heapsize::heap_size_of
[−]
[src]
pub unsafe fn heap_size_of(ptr: *const c_void) -> usize
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