pub struct AllocatorDummy;
Expand description
虚假的内存分配器
Trait Implementations§
source§impl GlobalAlloc for AllocatorDummy
impl GlobalAlloc for AllocatorDummy
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