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]
impl Metadatapub fn new() -> Result<Metadata>[src]
pub fn new() -> Result<Metadata>Returns a new Metadata.
pub fn get(&self) -> Result<usize>[src]
pub fn get(&self) -> Result<usize>Returns the total number of bytes dedicated to jemalloc metadata.