Struct zircon_object::vm::VmAddressRegion[][src]

pub struct VmAddressRegion { /* fields omitted */ }

Virtual Memory Address Regions

Implementations

impl VmAddressRegion[src]

pub fn new_root() -> Arc<Self>[src]

Create a new root VMAR.

pub fn new_kernel() -> Arc<Self>[src]

Create a kernel root VMAR.

pub fn allocate_at(
    self: &Arc<Self>,
    offset: usize,
    len: usize,
    flags: VmarFlags,
    align: usize
) -> ZxResult<Arc<Self>>
[src]

Create a child VMAR at the offset.

pub fn allocate(
    self: &Arc<Self>,
    offset: Option<usize>,
    len: usize,
    flags: VmarFlags,
    align: usize
) -> ZxResult<Arc<Self>>
[src]

Create a child VMAR with optional offset.

pub fn map_at(
    &self,
    vmar_offset: usize,
    vmo: Arc<VmObject>,
    vmo_offset: usize,
    len: usize,
    flags: MMUFlags
) -> ZxResult<VirtAddr>
[src]

Map the vmo into this VMAR at given offset.

pub fn map(
    &self,
    vmar_offset: Option<usize>,
    vmo: Arc<VmObject>,
    vmo_offset: usize,
    len: usize,
    flags: MMUFlags
) -> ZxResult<VirtAddr>
[src]

Map the vmo into this VMAR.

pub fn map_ext(
    &self,
    vmar_offset: Option<usize>,
    vmo: Arc<VmObject>,
    vmo_offset: usize,
    len: usize,
    permissions: MMUFlags,
    flags: MMUFlags,
    overwrite: bool,
    map_range: bool
) -> ZxResult<VirtAddr>
[src]

Map the vmo into this VMAR.

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

Unmaps all VMO mappings and destroys all sub-regions within the absolute range including addr and ending before exclusively at addr + len. Any sub-region that is in the range must be fully in the range (i.e. partial overlaps are an error). If a mapping is only partially in the range, the mapping is split and the requested portion is unmapped.

pub fn protect(&self, addr: usize, len: usize, flags: MMUFlags) -> ZxResult[src]

Change protections on a subset of the region of memory in the containing address space. If the requested range overlaps with a subregion, protect() will fail.

pub fn destroy(self: &Arc<Self>) -> ZxResult[src]

Unmap all mappings within the VMAR, and destroy all sub-regions of the region.

pub fn clear(&self) -> ZxResult[src]

Unmap all mappings and destroy all sub-regions of VMAR.

pub fn table_phys(&self) -> PhysAddr[src]

Get physical address of the underlying page table.

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

Get start address of this VMAR.

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

Whether this VMAR is dead.

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

Whether this VMAR is alive.

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

Get information of this VmAddressRegion

pub fn get_flags(&self) -> VmarFlags[src]

Get VmarFlags of this VMAR.

pub fn dump(&self)[src]

Dump all mappings recursively.

pub fn vdso_base_addr(&self) -> Option<usize>[src]

Get base address of vdso.

pub fn handle_page_fault(&self, vaddr: VirtAddr, flags: MMUFlags) -> ZxResult[src]

Handle page fault happened on this VMAR.

The fault virtual address is vaddr and the reason is in flags.

pub fn fork_from(&self, src: &Arc<Self>) -> ZxResult[src]

Clone the entire address space and VMOs from source VMAR. (For Linux fork)

pub fn get_task_stats(&self) -> TaskStatsInfo[src]

Returns statistics about memory used by a task.

pub fn read_memory(&self, vaddr: usize, buf: &mut [u8]) -> ZxResult<usize>[src]

Read from address space.

Return the actual number of bytes read.

pub fn write_memory(&self, vaddr: usize, buf: &[u8]) -> ZxResult<usize>[src]

Write to address space.

Return the actual number of bytes written.

pub fn find_mapping(&self, vaddr: usize) -> Option<Arc<VmMapping>>[src]

Find mapping of vaddr

Trait Implementations

impl Debug for VmAddressRegion[src]

impl KernelObject for VmAddressRegion[src]

impl VmarExt for VmAddressRegion[src]

Auto Trait Implementations

impl !RefUnwindSafe for VmAddressRegion

impl Send for VmAddressRegion

impl Sync for VmAddressRegion

impl Unpin for VmAddressRegion

impl !UnwindSafe for VmAddressRegion

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.