pub struct Allocator { /* private fields */ }Implementations§
Source§impl Allocator
impl Allocator
Source§impl Allocator
impl Allocator
Sourcepub unsafe fn free(&self, ptr: NonNull<u8>)
pub unsafe fn free(&self, ptr: NonNull<u8>)
Free a block of memory previously allocated by this allocator.
§Safety
- The
ptrmust be a valid pointer to a block of memory allocated by this allocator. - The
ptrmust not have been freed before.
Sourcepub unsafe fn free_offset(&self, offset: usize)
pub unsafe fn free_offset(&self, offset: usize)
Free a block of memory previously allocated by this allocator.
§Safety
- The
offsetmust be a valid offset within the memory allocated by this allocator. - The
offsetmust not have been freed before.
Source§impl Allocator
impl Allocator
Sourcepub fn clean_remote_free_lists(&self)
pub fn clean_remote_free_lists(&self)
Frees all items in remote free lists.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Allocator
impl RefUnwindSafe for Allocator
impl !Sync for Allocator
impl Unpin for Allocator
impl UnwindSafe for Allocator
Blanket Implementations§
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