Struct tikv_jemalloc_ctl::stats::mapped

source ·
pub struct mapped;
Expand description

Total number of bytes in active extents mapped by the allocator.

This does not include inactive extents, even those that contain unused dirty pages, so there is no strict ordering between this and the value returned by resident. This is a multiple of the page size, and is larger than the value returned by active.

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

This corresponds to stats.mapped in jemalloc’s API.

§Examples

use tikv_jemalloc_ctl::{epoch, stats};
let e = epoch::mib().unwrap();
let mapped = stats::mapped::mib().unwrap();

e.advance().unwrap();
let size = mapped.read().unwrap();
println!("{} bytes of total mapped data", size);

Implementations§

source§

impl mapped

source

pub fn mib() -> Result<mapped_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 mapped

source

pub fn read() -> Result<size_t>

Reads value using string API.

Auto Trait Implementations§

§

impl Freeze for mapped

§

impl RefUnwindSafe for mapped

§

impl Send for mapped

§

impl Sync for mapped

§

impl Unpin for mapped

§

impl UnwindSafe for mapped

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where 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 T
where 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 T
where 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 T
where 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.