Struct zircon_object::vm::VmObject[][src]

pub struct VmObject { /* fields omitted */ }

Virtual memory containers

SYNOPSIS

A Virtual Memory Object (VMO) represents a contiguous region of virtual memory that may be mapped into multiple address spaces.

Implementations

impl VmObject[src]

pub fn new_paged(pages: usize) -> Arc<Self>[src]

Create a new VMO backing on physical memory allocated in pages.

pub fn new_paged_with_resizable(resizable: bool, pages: usize) -> Arc<Self>[src]

Create a new VMO, which can be resizable, backing on physical memory allocated in pages.

pub fn new_physical(paddr: PhysAddr, pages: usize) -> Arc<Self>[src]

Create a new VMO representing a piece of contiguous physical memory.

pub fn new_contiguous(pages: usize, align_log2: usize) -> ZxResult<Arc<Self>>[src]

Create a VM object referring to a specific contiguous range of physical frame.

pub fn create_child(
    self: &Arc<Self>,
    resizable: bool,
    offset: usize,
    len: usize
) -> ZxResult<Arc<Self>>
[src]

Create a child VMO.

pub fn create_slice(
    self: &Arc<Self>,
    offset: usize,
    p_size: usize
) -> ZxResult<Arc<Self>>
[src]

Create a child slice as an VMO

pub fn set_len(&self, len: usize) -> ZxResult[src]

Set the length of this VMO if resizable.

pub fn set_content_size_and_resize(
    &self,
    size: usize,
    zero_until_offset: usize
) -> ZxResult<usize>
[src]

Set the size of the content stored in the VMO in bytes, resize vmo if needed

pub fn content_size(&self) -> usize[src]

Get the size of the content stored in the VMO in bytes.

pub fn set_content_size(&self, size: usize) -> ZxResult[src]

Get the size of the content stored in the VMO in bytes.

pub fn get_info(&self) -> VmoInfo[src]

Get information of this VMO.

pub fn set_cache_policy(&self, policy: CachePolicy) -> ZxResult[src]

Set the cache policy.

pub fn append_mapping(&self, mapping: Weak<VmMapping>)[src]

Append a mapping to the VMO’s mapping list.

pub fn remove_mapping(&self, mapping: Weak<VmMapping>)[src]

Remove a mapping from the VMO’s mapping list.

pub fn share_count(&self) -> usize[src]

Returns an estimate of the number of unique VmAspaces that this object is mapped into.

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

Returns true if the object size can be changed.

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

Returns true if the object is backed by a contiguous range of physical memory.

Methods from Deref<Target = Arc<dyn VMObjectTrait>>

Trait Implementations

impl Debug for VmObject[src]

impl Deref for VmObject[src]

type Target = Arc<dyn VMObjectTrait>

The resulting type after dereferencing.

impl Drop for VmObject[src]

impl KernelObject for VmObject[src]

Auto Trait Implementations

impl !RefUnwindSafe for VmObject

impl Send for VmObject

impl Sync for VmObject

impl Unpin for VmObject

impl !UnwindSafe for VmObject

Blanket Implementations

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

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

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

impl<T> Downcast for T where
    T: Any
[src]

impl<T> DowncastSync for T where
    T: Send + Sync + Any
[src]

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

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

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.

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.