Skip to content
Permalink
Browse files
8270347: ZGC: Adopt release-acquire ordering for forwarding table access
Co-authored-by: Hao Tang <albert.th@alibaba-inc.com>
Reviewed-by: eosterlund, pliden
  • Loading branch information
2 people authored and pliden committed Aug 3, 2021
1 parent b217a6c commit bdb50cab79056bb2ac9fe1ba0cf0f237317052da
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/hotspot/share/gc/z/zForwarding.inline.hpp
@@ -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;

1 comment on commit bdb50ca

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on bdb50ca Aug 3, 2021

Please sign in to comment.