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
sourceimpl GlobalAlloc for Jemalloc
impl GlobalAlloc for Jemalloc
sourceunsafe fn alloc(&self, layout: Layout) -> *mut u8
unsafe fn alloc(&self, layout: Layout) -> *mut u8
Allocate memory as described by the given layout
. Read more
sourceunsafe 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 more
impl 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more