pub struct AllocatorMempool;
Expand description
基于mempool的内存分配器
Trait Implementations§
source§impl GlobalAlloc for AllocatorMempool
impl GlobalAlloc for AllocatorMempool
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 more1.28.0§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