pub struct RemoteFreeBatch<'a> { /* private fields */ }Expand description
Collects frees and publishes remote frees in batches grouped by owning worker.
Frees owned by the worker represented by the Allocator handle that created
the batch are reclaimed immediately. All other frees are linked into intrusive
chains and published when Self::flush is called or the batch is dropped.
Implementations§
Source§impl<'a> RemoteFreeBatch<'a>
impl<'a> RemoteFreeBatch<'a>
Sourcepub unsafe fn free(&mut self, ptr: NonNull<u8>)
pub unsafe fn free(&mut self, ptr: NonNull<u8>)
Free a block of memory from this allocator region.
Locally owned allocations are reclaimed immediately. Remote frees remain private to this batch until it is flushed or dropped.
§Safety
ptrmust point to a valid allocation in this allocator region.- The
ptrmust not have been freed before or added to another free batch.
Sourcepub unsafe fn free_offset(&mut self, offset: usize)
pub unsafe fn free_offset(&mut self, offset: usize)
Free a block of memory from this allocator region.
Locally owned allocations are reclaimed immediately. Remote frees remain private to this batch until it is flushed or dropped.
§Safety
offsetmust identify a valid allocation in this allocator region.- The
offsetmust not have been freed before or added to another free batch.
Trait Implementations§
Source§impl Drop for RemoteFreeBatch<'_>
impl Drop for RemoteFreeBatch<'_>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for RemoteFreeBatch<'a>
impl<'a> !Send for RemoteFreeBatch<'a>
impl<'a> !Sync for RemoteFreeBatch<'a>
impl<'a> !UnwindSafe for RemoteFreeBatch<'a>
impl<'a> Freeze for RemoteFreeBatch<'a>
impl<'a> Unpin for RemoteFreeBatch<'a>
impl<'a> UnsafeUnpin for RemoteFreeBatch<'a>
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