pub struct KernelMemoryManager { /* private fields */ }
Expand description
High-level memory management for kernel operations
Implementations§
Source§impl KernelMemoryManager
impl KernelMemoryManager
Sourcepub fn allocate_kernel_memory(
&self,
size: usize,
alignment: usize,
) -> Result<*mut u8>
pub fn allocate_kernel_memory( &self, size: usize, alignment: usize, ) -> Result<*mut u8>
Allocate aligned memory for kernel operations
Sourcepub unsafe fn deallocate_kernel_memory(&self, ptr: *mut u8) -> Result<()>
pub unsafe fn deallocate_kernel_memory(&self, ptr: *mut u8) -> Result<()>
Deallocate kernel memory
§Safety
The caller must ensure that the pointer was allocated by this memory pool and is not used after this function returns.
Sourcepub fn total_kernel_memory(&self) -> usize
pub fn total_kernel_memory(&self) -> usize
Get total allocated kernel memory
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for KernelMemoryManager
impl RefUnwindSafe for KernelMemoryManager
impl !Send for KernelMemoryManager
impl !Sync for KernelMemoryManager
impl Unpin for KernelMemoryManager
impl UnwindSafe for KernelMemoryManager
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