Struct jemalloc_ctl::stats::Metadata[][src]

pub struct Metadata(_);

A type providing access to 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 type for more information.

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

Examples

extern crate jemallocator;
extern crate jemalloc_ctl;

use jemalloc_ctl::Epoch;
use jemalloc_ctl::stats::Metadata;

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

fn main() {
    let epoch = Epoch::new().unwrap();
    let metadata = Metadata::new().unwrap();

    epoch.advance().unwrap();
    let size = metadata.get().unwrap();
    println!("{} bytes of jemalloc metadata", size);
}

Methods

impl Metadata
[src]

Returns a new Metadata.

Returns the total number of bytes dedicated to jemalloc metadata.

Trait Implementations

impl Copy for Metadata
[src]

impl Clone for Metadata
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for Metadata

impl Sync for Metadata