Struct tikv_jemallocator::Jemalloc
source · pub struct Jemalloc;
Expand description
Handle to the jemalloc allocator
This type implements the GlobalAllocAlloc
trait, allowing usage a global allocator.
When the alloc_trait
feature of this crate is enabled, it also implements the Alloc
trait,
allowing usage in collections.
Trait Implementations§
source§impl GlobalAlloc for Jemalloc
impl GlobalAlloc for Jemalloc
source§unsafe fn alloc(&self, layout: Layout) -> *mut u8
unsafe fn alloc(&self, layout: Layout) -> *mut u8
Allocate memory as described by the given
layout
. Read moresource§unsafe fn alloc_zeroed(&self, layout: Layout) -> *mut u8
unsafe fn alloc_zeroed(&self, layout: Layout) -> *mut u8
Behaves like
alloc
, but also ensures that the contents
are set to zero before being returned. Read moreimpl Copy for Jemalloc
Auto Trait Implementations§
impl RefUnwindSafe for Jemalloc
impl Send for Jemalloc
impl Sync for Jemalloc
impl Unpin for Jemalloc
impl UnwindSafe for Jemalloc
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