RFR: 8374679: ZGC: Convert zForwardingAllocator to use Atomic<T>

Axel Boldt-Christmas aboldtch at openjdk.org
Mon Jan 26 14:16:59 UTC 2026


On Wed, 14 Jan 2026 08:29:43 GMT, Axel Boldt-Christmas <aboldtch at openjdk.org> wrote:

> Convert usages of AtomicAccess to Atomic<T> in zForwardingAllocator.
> 
> We currently use  plain loads and stores which are synchronised and ordered with respect to the allocation by means of us starting worker threads which allocate and awaiting them to finish. This patch changes everything to have atomic semantics, but the loads and stores are still relaxed. 
> 
> Testing:
>  * GHA
>  * HotSpot GC tests with ZGC linux x64 and linux aarch64

Thanks for the reviews. Compiled locally with latest master merged.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/29221#issuecomment-3799808669


More information about the hotspot-gc-dev mailing list