Function jemalloc_ctl::stats::metadata[][src]

pub fn metadata() -> Result<usize>

Returns the total number of bytes dedicated to jemalloc metadata.

This statistic is cached, and is only refreshed when the epoch is advanced. See the epoch function for more information.

This corresponds to stats.metadata in jemalloc's API.

Examples

extern crate jemallocator;
extern crate jemalloc_ctl;

#[global_allocator]
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;

fn main() {
    jemalloc_ctl::epoch().unwrap();
    println!("{} bytes of jemalloc metadata", jemalloc_ctl::stats::metadata().unwrap());
}