8270347: ZGC: Adopt release-acquire ordering for forwarding table access
Co-authored-by: Hao Tang <albert.th@alibaba-inc.com> Reviewed-by: eosterlund, pliden
This commit is contained in:
parent
b217a6ca0f
commit
bdb50cab79
@ -137,7 +137,7 @@ inline uintptr_t ZForwarding::insert(uintptr_t from_index, uintptr_t to_offset,
|
||||
const ZForwardingEntry old_entry; // Empty
|
||||
|
||||
for (;;) {
|
||||
const ZForwardingEntry prev_entry = Atomic::cmpxchg(entries() + *cursor, old_entry, new_entry);
|
||||
const ZForwardingEntry prev_entry = Atomic::cmpxchg(entries() + *cursor, old_entry, new_entry, memory_order_release);
|
||||
if (!prev_entry.populated()) {
|
||||
// Success
|
||||
return to_offset;
|
||||
|
Loading…
Reference in New Issue
Block a user