Struct composable_allocators::freelist::Freelist
source · [−]Implementations
Trait Implementations
sourceimpl<P: Params, A: Allocator> Allocator for Freelist<P, A>
impl<P: Params, A: Allocator> Allocator for Freelist<P, A>
sourcefn allocate(&self, layout: Layout) -> Result<NonNull<[u8]>, AllocError>
fn allocate(&self, layout: Layout) -> Result<NonNull<[u8]>, AllocError>
🔬 This is a nightly-only experimental API. (
allocator_api)Attempts to allocate a block of memory. Read more
sourcefn allocate_zeroed(&self, layout: Layout) -> Result<NonNull<[u8]>, AllocError>
fn allocate_zeroed(&self, layout: Layout) -> Result<NonNull<[u8]>, AllocError>
🔬 This is a nightly-only experimental API. (
allocator_api)Behaves like allocate, but also ensures that the returned memory is zero-initialized. Read more
sourceunsafe fn deallocate(&self, ptr: NonNull<u8>, layout: Layout)
unsafe fn deallocate(&self, ptr: NonNull<u8>, layout: Layout)
🔬 This is a nightly-only experimental API. (
allocator_api)Deallocates the memory referenced by ptr. Read more
sourceunsafe fn grow(
&self,
ptr: NonNull<u8>,
old_layout: Layout,
new_layout: Layout
) -> Result<NonNull<[u8]>, AllocError>
unsafe fn grow(
&self,
ptr: NonNull<u8>,
old_layout: Layout,
new_layout: Layout
) -> Result<NonNull<[u8]>, AllocError>
🔬 This is a nightly-only experimental API. (
allocator_api)Attempts to extend the memory block. Read more
sourceunsafe fn grow_zeroed(
&self,
ptr: NonNull<u8>,
old_layout: Layout,
new_layout: Layout
) -> Result<NonNull<[u8]>, AllocError>
unsafe fn grow_zeroed(
&self,
ptr: NonNull<u8>,
old_layout: Layout,
new_layout: Layout
) -> Result<NonNull<[u8]>, AllocError>
🔬 This is a nightly-only experimental API. (
allocator_api)Behaves like grow, but also ensures that the new contents are set to zero before being
returned. Read more
sourceimpl<P: Params, A: Fallbackable> Fallbackable for Freelist<P, A>
impl<P: Params, A: Fallbackable> Fallbackable for Freelist<P, A>
impl<P: Params, A: NonUnwinding> NonUnwinding for Freelist<P, A>
Auto Trait Implementations
impl<P, A> !RefUnwindSafe for Freelist<P, A>
impl<P, A> !Send for Freelist<P, A>
impl<P, A> !Sync for Freelist<P, A>
impl<P, A> Unpin for Freelist<P, A> where
A: Unpin,
P: Unpin,
impl<P, A> UnwindSafe for Freelist<P, A> where
A: UnwindSafe,
P: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more