Struct sp_std::alloc::Global [−][src]
pub struct Global;
🔬 This is a nightly-only experimental API. (
allocator_api)The global memory allocator.
This type implements the Allocator trait by forwarding calls
to the allocator registered with the #[global_allocator] attribute
if there is one, or the std crate’s default.
Note: while this type is unstable, the functionality it provides can be
accessed through the free functions in alloc.
Trait Implementations
impl Allocator for Global[src]
impl Allocator for Global[src]pub fn allocate(&self, layout: Layout) -> Result<NonNull<[u8]>, AllocError>[src]
pub fn allocate_zeroed(
&self,
layout: Layout
) -> Result<NonNull<[u8]>, AllocError>[src]
&self,
layout: Layout
) -> Result<NonNull<[u8]>, AllocError>
pub unsafe fn deallocate(&self, ptr: NonNull<u8>, layout: Layout)[src]
pub unsafe fn grow(
&self,
ptr: NonNull<u8>,
old_layout: Layout,
new_layout: Layout
) -> Result<NonNull<[u8]>, AllocError>[src]
&self,
ptr: NonNull<u8>,
old_layout: Layout,
new_layout: Layout
) -> Result<NonNull<[u8]>, AllocError>
pub unsafe fn grow_zeroed(
&self,
ptr: NonNull<u8>,
old_layout: Layout,
new_layout: Layout
) -> Result<NonNull<[u8]>, AllocError>[src]
&self,
ptr: NonNull<u8>,
old_layout: Layout,
new_layout: Layout
) -> Result<NonNull<[u8]>, AllocError>
pub unsafe fn shrink(
&self,
ptr: NonNull<u8>,
old_layout: Layout,
new_layout: Layout
) -> Result<NonNull<[u8]>, AllocError>[src]
&self,
ptr: NonNull<u8>,
old_layout: Layout,
new_layout: Layout
) -> Result<NonNull<[u8]>, AllocError>