You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is needed for collectors that use concurrent marking or forwarding pointers, like Java's ZGC and Shenandoah.
I used to think this was impossible, but now I think it is not.
I think we could insert them in the deref implementation of Gc. We could guarantee the pointers are updated at least once after each safe point. Is this good enough?
TODO: Consult The GC Handbook
The text was updated successfully, but these errors were encountered:
I've implemented concurrent copying in Rust but it was based on C4: cgc. It's object header is quite large as it has 2 words: pointer to vtable and pointer to forwarding word. Forwarding word by default points to object itself and read barrier is as simpel as this:
pub(crate)unsafefnread_barrier_impl<T:Trace>(src_:*mutHeapInner<T>) -> *mutHeapInner<T>{let src = &*src_;// src.forward points to fromspace or to tospace.let r = src.forward.load(Ordering::Acquire)as*mut_;
log::trace!("Read barrier: From {:p} to {:p}", src_, r);
r
}
This barrier means always doing two loads but it is much better than read barriers with conditions
This is needed for collectors that use concurrent marking or forwarding pointers, like Java's ZGC and Shenandoah.
I used to think this was impossible, but now I think it is not.
I think we could insert them in the
deref
implementation of Gc. We could guarantee the pointers are updated at least once after each safe point. Is this good enough?TODO: Consult The GC Handbook
The text was updated successfully, but these errors were encountered: