pub struct SatbBuffer { /* private fields */ }Expand description
Thread-local SATB buffer that accumulates old reference values overwritten during an active marking phase.
Implementations§
Source§impl SatbBuffer
impl SatbBuffer
Sourcepub fn enqueue(&mut self, old_ref: *mut u8)
pub fn enqueue(&mut self, old_ref: *mut u8)
Enqueue an old reference that was just overwritten.
This is the core write-barrier operation. It must be called before the store overwrites the old pointer value.
Sourcepub fn drain(&mut self) -> Vec<*mut u8>
pub fn drain(&mut self) -> Vec<*mut u8>
Drain all enqueued references, returning them as a Vec.
After draining, the buffer is empty and ready for new entries.
Sourcepub fn should_flush(&self) -> bool
pub fn should_flush(&self) -> bool
Whether the buffer has reached its flush capacity.
Trait Implementations§
Source§impl Default for SatbBuffer
impl Default for SatbBuffer
impl Send for SatbBuffer
Auto Trait Implementations§
impl Freeze for SatbBuffer
impl RefUnwindSafe for SatbBuffer
impl !Sync for SatbBuffer
impl Unpin for SatbBuffer
impl UnsafeUnpin for SatbBuffer
impl UnwindSafe for SatbBuffer
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