pub struct WindowsRegion<'a, Driver>{ /* private fields */ }Expand description
A Windows memory region.
A memory region represents a range of virtual memory allocated within a process. It is managed by the Windows memory manager and described by a Virtual Address Descriptor (VAD).
§Implementation Details
Corresponds to _MMVAD.
Implementations§
Source§impl<'a, Driver> WindowsRegion<'a, Driver>
impl<'a, Driver> WindowsRegion<'a, Driver>
Sourcepub fn new(vmi: VmiState<'a, WindowsOs<Driver>>, vad: Va) -> Self
pub fn new(vmi: VmiState<'a, WindowsOs<Driver>>, vad: Va) -> Self
Creates a new Windows memory region.
Sourcepub fn starting_vpn(&self) -> Result<u64, VmiError>
pub fn starting_vpn(&self) -> Result<u64, VmiError>
Returns the starting VPN of the VAD.
§Implementation Details
The starting VPN is calculated from _MMVAD_SHORT.StartingVpn and,
if present, _MMVAD_SHORT.StartingVpnHigh fields.
Sourcepub fn ending_vpn(&self) -> Result<u64, VmiError>
pub fn ending_vpn(&self) -> Result<u64, VmiError>
Returns the ending VPN of the VAD.
§Implementation Details
The ending VPN is calculated from _MMVAD_SHORT.EndingVpn and,
if present, _MMVAD_SHORT.EndingVpnHigh fields.
Sourcepub fn vad_protection(&self) -> Result<u8, VmiError>
pub fn vad_protection(&self) -> Result<u8, VmiError>
Returns the memory protection of the VAD.
§Implementation Details
Calculated from _MMVAD_SHORT.VadFlags.Protection field.
Sourcepub fn private_memory(&self) -> Result<bool, VmiError>
pub fn private_memory(&self) -> Result<bool, VmiError>
Checks if the VAD represents private memory.
§Implementation Details
Corresponds to _MMVAD_SHORT.VadFlags.PrivateMemory.
Sourcepub fn commit_charge(&self) -> Result<u64, VmiError>
pub fn commit_charge(&self) -> Result<u64, VmiError>
Returns the commit charge of the VAD.
§Implementation Details
Corresponds to _MMVAD_SHORT.VadFlags.CommitCharge (Windows 7) or
_MMVAD_SHORT.VadFlags1.CommitCharge (Windows 8+).
Sourcepub fn mem_commit(&self) -> Result<bool, VmiError>
pub fn mem_commit(&self) -> Result<bool, VmiError>
Checks if the memory of the VAD is committed.
§Implementation Details
Corresponds to _MMVAD_SHORT.VadFlags.MemCommit (Windows 7) or
_MMVAD_SHORT.VadFlags1.MemCommit (Windows 8+).
Sourcepub fn left_child(&self) -> Result<Option<WindowsRegion<'a, Driver>>, VmiError>
pub fn left_child(&self) -> Result<Option<WindowsRegion<'a, Driver>>, VmiError>
Sourcepub fn right_child(&self) -> Result<Option<WindowsRegion<'a, Driver>>, VmiError>
pub fn right_child(&self) -> Result<Option<WindowsRegion<'a, Driver>>, VmiError>
Trait Implementations§
Source§impl<Driver> Debug for WindowsRegion<'_, Driver>
impl<Driver> Debug for WindowsRegion<'_, Driver>
Source§impl<'a, Driver> VmiOsRegion<'a, Driver> for WindowsRegion<'a, Driver>
impl<'a, Driver> VmiOsRegion<'a, Driver> for WindowsRegion<'a, Driver>
Source§fn start(&self) -> Result<Va, VmiError>
fn start(&self) -> Result<Va, VmiError>
Returns the starting virtual address of the memory region.
§Implementation Details
The starting address is calculated from _MMVAD_SHORT.StartingVpn and,
if present, _MMVAD_SHORT.StartingVpnHigh fields.
Source§fn end(&self) -> Result<Va, VmiError>
fn end(&self) -> Result<Va, VmiError>
Returns the ending virtual address of the memory region.
§Implementation Details
The ending address is calculated from _MMVAD_SHORT.EndingVpn and,
if present, _MMVAD_SHORT.EndingVpnHigh fields.
Source§fn protection(&self) -> Result<MemoryAccess, VmiError>
fn protection(&self) -> Result<MemoryAccess, VmiError>
Returns the memory protection of the memory region.
§Implementation Details
Calculated from _MMVAD_SHORT.VadFlags.Protection field.
Source§impl<Driver> VmiVa for WindowsRegion<'_, Driver>
impl<Driver> VmiVa for WindowsRegion<'_, Driver>
Auto Trait Implementations§
impl<'a, Driver> !Freeze for WindowsRegion<'a, Driver>
impl<'a, Driver> !RefUnwindSafe for WindowsRegion<'a, Driver>
impl<'a, Driver> !Send for WindowsRegion<'a, Driver>
impl<'a, Driver> !Sync for WindowsRegion<'a, Driver>
impl<'a, Driver> !UnwindSafe for WindowsRegion<'a, Driver>
impl<'a, Driver> Unpin for WindowsRegion<'a, Driver>
impl<'a, Driver> UnsafeUnpin for WindowsRegion<'a, Driver>
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.