You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of #371 - stepancheg:alloc-info, r=Amanieu
RawTable::allocation_info
We are implementing memory profiler for Rust.
We can approximate how much memory is occupied by `RawTable` by replicating some logic of `RawTable`, but it would be more correct/reliable if `RawTable` just exposed this information.
`RawTable::allocation_info` returns just that.
It returns both `Layout` and pointer to allocated memory.
Pointer is helpful when using with jemalloc: the pointer can be passed to `malloc_usable_size` function to measure precisely not just how much memory is requested by `RawTable`, but also what is malloc padding for the allocation.
0 commit comments