pub struct Jemalloc;Expand description
Handle to the jemalloc allocator
This type implements the GlobalAllocAlloc trait, allowing usage a global
allocator.
When the api feature of this crate is enabled, it also implements the
Allocator 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
Allocates 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 more