Struct pagemap::PageMapEntry[][src]

pub struct PageMapEntry { /* fields omitted */ }

An entry read from /proc/<PID>/pagemap for a process, and optionally from /proc/kpagecount and /proc/kpageflags too.

Documentation and details about the various bits of the API can be found in Linux, at doc/Documentation/vm/pagemap.txt.

Implementations

impl PageMapEntry[src]

Constants are defined in Linux, at fs/proc/task_mmu.c.

pub const PM_PFRAME_BITS: u64[src]

pub const PM_PFRAME_MASK: u64[src]

pub const PM_SOFT_DIRTY: u64[src]

pub const PM_MMAP_EXCLUSIVE: u64[src]

pub const PM_FILE: u64[src]

pub const PM_SWAP: u64[src]

pub const PM_PRESENT: u64[src]

pub fn raw_pagemap(&self) -> u64[src]

The raw u64 value as read from procfs(5).

pub fn present(&self) -> bool[src]

Returns true if the Self::PM_PRESENT bit is set; false otherwise.

pub fn swapped(&self) -> bool[src]

Returns true if the Self::PM_SWAP bit is set; false otherwise.

pub fn file_mapped(&self) -> bool[src]

Returns true if the Self::PM_FILE bit is set; false otherwise.

pub fn shared_anonymous(&self) -> bool[src]

Returns true if the Self::PM_FILE bit is clear; false otherwise.

pub fn exclusively_mapped(&self) -> bool[src]

Returns true if the Self::PM_MMAP_EXCLUSIVE bit is set; false otherwise.

pub fn soft_dirty(&self) -> bool[src]

Returns true if the Self::PM_SOFT_DIRTY bit is set; false otherwise.

pub fn pfn(&self) -> Result<u64>[src]

Returns the page frame number (decoding bits 0-54) if the Self::PM_PRESENT bit is set; otherwise returns an error.

pub fn swap_type(&self) -> Result<u8>[src]

Returns the swap type (decoding bits 0-4) if the Self::PM_SWAP bit is set; otherwise returns an error.

pub fn swap_offset(&self) -> Result<u64>[src]

Returns the swap offset (decoding bits 5-55) if the Self::PM_SWAP bit is set; otherwise returns an error.

pub fn kpagecount(&self) -> Option<u64>[src]

The raw u64 value as read from procfs(5), or None if /proc/kpagecount could not be accessed.

pub fn kpageflags(&self) -> Option<KPageFlags>[src]

The KPageFlags parsed from /proc/kpageflags for the page frame in this PageMapEntry.

pub fn raw_kpageflags(&self) -> Option<u64>[src]

The raw u64 value as read from procfs(5), or None if /proc/kpageflags could not be accessed.

pub fn locked(&self) -> Option<bool>[src]

Returns Some(true) if the corresponding bit is set; Some(false) otherwise. It returns None if /proc/kpageflags could not be read for the page at hand.

pub fn error(&self) -> Option<bool>[src]

Returns Some(true) if the corresponding bit is set; Some(false) otherwise. It returns None if /proc/kpageflags could not be read for the page at hand.

pub fn referenced(&self) -> Option<bool>[src]

Returns Some(true) if the corresponding bit is set; Some(false) otherwise. It returns None if /proc/kpageflags could not be read for the page at hand.

pub fn uptodate(&self) -> Option<bool>[src]

Returns Some(true) if the corresponding bit is set; Some(false) otherwise. It returns None if /proc/kpageflags could not be read for the page at hand.

pub fn dirty(&self) -> Option<bool>[src]

Returns Some(true) if the corresponding bit is set; Some(false) otherwise. It returns None if /proc/kpageflags could not be read for the page at hand.

pub fn lru(&self) -> Option<bool>[src]

Returns Some(true) if the corresponding bit is set; Some(false) otherwise. It returns None if /proc/kpageflags could not be read for the page at hand.

pub fn active(&self) -> Option<bool>[src]

Returns Some(true) if the corresponding bit is set; Some(false) otherwise. It returns None if /proc/kpageflags could not be read for the page at hand.

pub fn slab(&self) -> Option<bool>[src]

Returns Some(true) if the corresponding bit is set; Some(false) otherwise. It returns None if /proc/kpageflags could not be read for the page at hand.

pub fn writeback(&self) -> Option<bool>[src]

Returns Some(true) if the corresponding bit is set; Some(false) otherwise. It returns None if /proc/kpageflags could not be read for the page at hand.

pub fn reclaim(&self) -> Option<bool>[src]

Returns Some(true) if the corresponding bit is set; Some(false) otherwise. It returns None if /proc/kpageflags could not be read for the page at hand.

pub fn buddy(&self) -> Option<bool>[src]

Returns Some(true) if the corresponding bit is set; Some(false) otherwise. It returns None if /proc/kpageflags could not be read for the page at hand.

pub fn mmap(&self) -> Option<bool>[src]

Returns Some(true) if the corresponding bit is set; Some(false) otherwise. It returns None if /proc/kpageflags could not be read for the page at hand.

pub fn anon(&self) -> Option<bool>[src]

Returns Some(true) if the corresponding bit is set; Some(false) otherwise. It returns None if /proc/kpageflags could not be read for the page at hand.

pub fn swapcache(&self) -> Option<bool>[src]

Returns Some(true) if the corresponding bit is set; Some(false) otherwise. It returns None if /proc/kpageflags could not be read for the page at hand.

pub fn swapbacked(&self) -> Option<bool>[src]

Returns Some(true) if the corresponding bit is set; Some(false) otherwise. It returns None if /proc/kpageflags could not be read for the page at hand.

pub fn compound_head(&self) -> Option<bool>[src]

Returns Some(true) if the corresponding bit is set; Some(false) otherwise. It returns None if /proc/kpageflags could not be read for the page at hand.

pub fn compound_tail(&self) -> Option<bool>[src]

Returns Some(true) if the corresponding bit is set; Some(false) otherwise. It returns None if /proc/kpageflags could not be read for the page at hand.

pub fn huge(&self) -> Option<bool>[src]

Returns Some(true) if the corresponding bit is set; Some(false) otherwise. It returns None if /proc/kpageflags could not be read for the page at hand.

pub fn unevictable(&self) -> Option<bool>[src]

Returns Some(true) if the corresponding bit is set; Some(false) otherwise. It returns None if /proc/kpageflags could not be read for the page at hand.

pub fn hwpoison(&self) -> Option<bool>[src]

Returns Some(true) if the corresponding bit is set; Some(false) otherwise. It returns None if /proc/kpageflags could not be read for the page at hand.

pub fn nopage(&self) -> Option<bool>[src]

Returns Some(true) if the corresponding bit is set; Some(false) otherwise. It returns None if /proc/kpageflags could not be read for the page at hand.

pub fn ksm(&self) -> Option<bool>[src]

Returns Some(true) if the corresponding bit is set; Some(false) otherwise. It returns None if /proc/kpageflags could not be read for the page at hand.

pub fn thp(&self) -> Option<bool>[src]

Returns Some(true) if the corresponding bit is set; Some(false) otherwise. It returns None if /proc/kpageflags could not be read for the page at hand.

pub fn offline(&self) -> Option<bool>[src]

Returns Some(true) if the corresponding bit is set; Some(false) otherwise. It returns None if /proc/kpageflags could not be read for the page at hand.

pub fn zero_page(&self) -> Option<bool>[src]

Returns Some(true) if the corresponding bit is set; Some(false) otherwise. It returns None if /proc/kpageflags could not be read for the page at hand.

pub fn idle(&self) -> Option<bool>[src]

Returns Some(true) if the corresponding bit is set; Some(false) otherwise. It returns None if /proc/kpageflags could not be read for the page at hand.

pub fn pgtable(&self) -> Option<bool>[src]

Returns Some(true) if the corresponding bit is set; Some(false) otherwise. It returns None if /proc/kpageflags could not be read for the page at hand.

Trait Implementations

impl Clone for PageMapEntry[src]

fn clone(&self) -> PageMapEntry[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for PageMapEntry[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl Display for PageMapEntry[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl From<(u64, u64, u64)> for PageMapEntry[src]

fn from((pgmap, kpgcn, kpgfl): (u64, u64, u64)) -> Self[src]

Performs the conversion.

impl From<u64> for PageMapEntry[src]

fn from(pgmap: u64) -> Self[src]

Performs the conversion.

impl Copy for PageMapEntry[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T> ToString for T where
    T: Display + ?Sized
[src]

pub default fn to_string(&self) -> String[src]

Converts the given value to a String. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.