Skip to content
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

RawTable::allocation_info #371

Merged
merged 1 commit into from Nov 9, 2022
Merged

RawTable::allocation_info #371

merged 1 commit into from Nov 9, 2022

Commits on Nov 3, 2022

  1. 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.
    stepancheg committed Nov 3, 2022
    Configuration menu
    Copy the full SHA
    299b0f6 View commit details
    Browse the repository at this point in the history