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, Driver, WindowsOs<Driver>>, vad: Va) -> Self
pub fn new(vmi: VmiState<'a, Driver, 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 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.