pub struct MappingContext {
pub user_vmar: Vmar,
pub user_vmar_info: VmarInfo,
pub private_anonymous: PrivateAnonymousMemoryManager,
}Expand description
State and resources of the MemoryManager that are either immutable after creation
or handle their own interior mutability (e.g., private_anonymous).
This is distinct from MemoryManagerState in that the fields here do not require
acquisition of the MemoryManager’s main lock for access. This allows concurrent
access to these resources without lock contention.
This structure primarily holds the Zircon VMAR handle and the manager for private anonymous memory, which are the core primitives used to manipulate the address space.
Fields§
§user_vmar: VmarThe VMAR in which userspace mappings occur.
We map userspace memory in this child VMAR so that we can destroy the entire VMAR during exec. For 32-bit tasks, we limit the user_vmar to correspond to the available memory.
This field is set to ZX_HANDLE_INVALID when the address-space has been destroyed (e.g. on
exec()), allowing the value to be pro-actively checked for, or the ZX_ERR_BAD_HANDLE
status return from Zircon operations handled, to suit the call-site.
user_vmar_info: VmarInfoCached VmarInfo for user_vmar.
private_anonymous: PrivateAnonymousMemoryManagerMemory object backing private, anonymous memory allocations in this address space.
Implementations§
Source§impl MappingContext
impl MappingContext
pub fn max_address(&self) -> UserAddress
Auto Trait Implementations§
impl Freeze for MappingContext
impl RefUnwindSafe for MappingContext
impl Send for MappingContext
impl Sync for MappingContext
impl Unpin for MappingContext
impl UnsafeUnpin for MappingContext
impl UnwindSafe for MappingContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
fn fidl_into_native(self) -> Box<N>
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
T to [Self]Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more