pub struct KernelMemory;Expand description
kernel-mode specific memory utilities
Implementations§
Source§impl KernelMemory
impl KernelMemory
Sourcepub fn copy(
destination: *mut c_void,
source: *const c_void,
length: usize,
) -> KmResult<()>
pub fn copy( destination: *mut c_void, source: *const c_void, length: usize, ) -> KmResult<()>
copy memory with exception handling
Sourcepub fn safe_copy(
destination: *mut c_void,
source: *const c_void,
length: usize,
) -> KmResult<usize>
pub fn safe_copy( destination: *mut c_void, source: *const c_void, length: usize, ) -> KmResult<usize>
safe copy that handles exceptions (returns partial copy size)
Sourcepub fn is_address_valid(address: *const c_void) -> bool
pub fn is_address_valid(address: *const c_void) -> bool
check if address is valid
Auto Trait Implementations§
impl Freeze for KernelMemory
impl RefUnwindSafe for KernelMemory
impl Send for KernelMemory
impl Sync for KernelMemory
impl Unpin for KernelMemory
impl UnwindSafe for KernelMemory
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