pub struct Global;
Trait Implementations§
Source§impl GlobalAlloc for Global
impl GlobalAlloc for Global
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 moreimpl Copy for Global
Auto Trait Implementations§
impl Freeze for Global
impl RefUnwindSafe for Global
impl Send for Global
impl Sync for Global
impl Unpin for Global
impl UnwindSafe for Global
Blanket Implementations§
Source§impl<T, A> Alloc<T> for Awhere
A: ByteAlloc,
impl<T, A> Alloc<T> for Awhere
A: ByteAlloc,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> ByteAlloc for Twhere
T: GlobalAlloc,
impl<T> ByteAlloc for Twhere
T: GlobalAlloc,
Source§fn alloc_bytes(&self, size: usize, align: usize) -> Result<NonNull<u8>, Error>
fn alloc_bytes(&self, size: usize, align: usize) -> Result<NonNull<u8>, Error>
Allocates a block of memory that is at least as aligned as
align
and at least as large as size
and returns a pointer to it.