struct FrameInnerAllocator {
bump: BumpAllocator,
live_alloc_count: AtomicI32,
references_dropped: AtomicI32,
frame_id: Option<FrameId>,
}Fields§
§bump: BumpAllocator§live_alloc_count: AtomicI32§references_dropped: AtomicI32We count the number of references dropped here and compare it against the
number of references created by the AllocatorMemory when we need to check
that the memory can be safely reused or released.
This looks and is very similar to a reference counting scheme (Arc). The
main differences are that we don’t want the reference count to drive the
lifetime of the allocator (only to check when we require all references to
have been dropped), and we do half as many the atomic operations since we only
count drops and not creations.
frame_id: Option<FrameId>Auto Trait Implementations§
impl !Freeze for FrameInnerAllocator
impl RefUnwindSafe for FrameInnerAllocator
impl !Send for FrameInnerAllocator
impl !Sync for FrameInnerAllocator
impl Unpin for FrameInnerAllocator
impl UnwindSafe for FrameInnerAllocator
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more