pub struct KVmalloc;
Expand description
The kvmalloc kernel allocator.
KVmalloc
attempts to allocate memory with Kmalloc
first, but falls back to Vmalloc
upon
failure. This allocator is typically used when the size for the requested allocation is not
known and may exceed the capabilities of Kmalloc
.
For more details see self.
Trait Implementations§
Source§impl Allocator for KVmalloc
impl Allocator for KVmalloc
Source§const MIN_ALIGN: usize = 8usize
const MIN_ALIGN: usize = 8usize
The minimum alignment satisfied by all allocations from this allocator. Read more
Source§unsafe fn realloc(
ptr: Option<NonNull<u8>>,
layout: Layout,
old_layout: Layout,
flags: Flags,
nid: NumaNode,
) -> Result<NonNull<[u8]>, AllocError>
unsafe fn realloc( ptr: Option<NonNull<u8>>, layout: Layout, old_layout: Layout, flags: Flags, nid: NumaNode, ) -> Result<NonNull<[u8]>, AllocError>
Re-allocate an existing memory allocation to satisfy the requested
layout
and
a specific NUMA node request to allocate the memory for. Read moreAuto Trait Implementations§
impl Freeze for KVmalloc
impl RefUnwindSafe for KVmalloc
impl Send for KVmalloc
impl Sync for KVmalloc
impl Unpin for KVmalloc
impl UnwindSafe for KVmalloc
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
Source§impl<T> PinInit<T> for T
impl<T> PinInit<T> for T
Source§unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), Infallible>
unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), Infallible>
Initializes
slot
. Read more