pub struct MmapAlloc;Available on crate feature
mmap only.Expand description
A simple mmap-based allocator that can be used to power Mimalloc.
It is only used to allocate large chunks of memory and is not suitable for general malloc.
Trait Implementations§
Source§impl GlobalAlloc for MmapAlloc
impl GlobalAlloc for MmapAlloc
Source§unsafe fn alloc(&self, layout: Layout) -> *mut u8
unsafe fn alloc(&self, layout: Layout) -> *mut u8
See GlobalAlloc::alloc.
§Safety
It can only allocate memory layouts whose size and alignment are multiples of the OS page size.
Auto Trait Implementations§
impl Freeze for MmapAlloc
impl RefUnwindSafe for MmapAlloc
impl Send for MmapAlloc
impl Sync for MmapAlloc
impl Unpin for MmapAlloc
impl UnwindSafe for MmapAlloc
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