Struct jemalloc_ctl::opt::zero

source ·
pub struct zero;
Expand description

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

use jemalloc_ctl::opt;
let zero = opt::zero::read().unwrap();
println!("zeroing: {}", zero);

Implementations§

source§

impl zero

source

pub fn mib() -> Result<zero_mib>

Returns Management Information Base (MIB)

This value can be used to access the key without doing string lookup.

source

pub fn name() -> &'static Name

source§

impl zero

source

pub fn read() -> Result<bool>

Reads value using string API.

Auto Trait Implementations§

§

impl RefUnwindSafe for zero

§

impl Send for zero

§

impl Sync for zero

§

impl Unpin for zero

§

impl UnwindSafe for zero

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.