Struct jemalloc_ctl::opt::Zero [−][src]
pub struct Zero(_);
A type providing access to jemalloc's zeroing behavior.
Requires --enable-fill to have been specified during build configuration.
If enabled, jemalloc will initialize each byte of uninitialized allocated memory to 0. This is intended for debugging and will impact performance negatively. It is disabled by default.
Examples
extern crate jemallocator; extern crate jemalloc_ctl; use jemalloc_ctl::opt::Zero; #[global_allocator] static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc; fn main() { let zero = Zero::new().unwrap(); println!("zeroing: {}", zero.get().unwrap()); }
Methods
impl Zero[src]
impl Zeropub fn new() -> Result<Zero>[src]
pub fn new() -> Result<Zero>Returns a new Zero.
pub fn get(&self) -> Result<bool>[src]
pub fn get(&self) -> Result<bool>Returns the jemalloc zeroing behavior.