pub struct MemoryChecker { /* private fields */ }Expand description
Validates memory accesses against a set of known MemoryRegions.
Implementations§
Source§impl MemoryChecker
impl MemoryChecker
Sourcepub fn new(allocations: Vec<MemoryRegion>) -> Self
pub fn new(allocations: Vec<MemoryRegion>) -> Self
Create a memory checker from a list of known allocations.
Sourcepub fn check_access(
&self,
address: u64,
size: usize,
is_write: bool,
) -> Option<DebugEvent>
pub fn check_access( &self, address: u64, size: usize, is_write: bool, ) -> Option<DebugEvent>
Check whether a memory access is valid.
Returns Some(DebugEvent) if the access is out of bounds or violates
read-only protections; None if the access is valid.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MemoryChecker
impl RefUnwindSafe for MemoryChecker
impl Send for MemoryChecker
impl Sync for MemoryChecker
impl Unpin for MemoryChecker
impl UnsafeUnpin for MemoryChecker
impl UnwindSafe for MemoryChecker
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
Mutably borrows from an owned value. Read more