Struct zircon_object::vm::VmObject [−][src]
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]
self: &Arc<Self>,
resizable: bool,
offset: usize,
len: usize
) -> ZxResult<Arc<Self>>
Create a child VMO.
pub fn create_slice(
self: &Arc<Self>,
offset: usize,
p_size: usize
) -> ZxResult<Arc<Self>>[src]
self: &Arc<Self>,
offset: usize,
p_size: usize
) -> ZxResult<Arc<Self>>
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]
&self,
size: usize,
zero_until_offset: usize
) -> ZxResult<usize>
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.
fn deref(&self) -> &Self::Target[src]
impl Drop for VmObject[src]
impl KernelObject for VmObject[src]
fn id(&self) -> KoID[src]
fn type_name(&self) -> &str[src]
fn name(&self) -> String[src]
fn set_name(&self, name: &str)[src]
fn signal(&self) -> Signal[src]
fn signal_set(&self, signal: Signal)[src]
fn signal_clear(&self, signal: Signal)[src]
fn signal_change(&self, clear: Signal, set: Signal)[src]
fn add_signal_callback(&self, callback: SignalHandler)[src]
fn get_child(&self, _id: KoID) -> ZxResult<Arc<dyn KernelObject>>[src]
fn peer(&self) -> ZxResult<Arc<dyn KernelObject>>[src]
fn related_koid(&self) -> KoID[src]
fn allowed_signals(&self) -> Signal[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Downcast for T where
T: Any, [src]
T: Any,
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>[src]
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>[src]
pub fn as_any(&self) -> &(dyn Any + 'static)[src]
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)[src]
impl<T> DowncastSync for T where
T: Send + Sync + Any, [src]
T: Send + Sync + Any,
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
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]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,