Integrated: 8333578: Fix uses of overaligned types induced by ZCACHE_ALIGNED

Axel Boldt-Christmas aboldtch at openjdk.org
Mon Mar 10 11:57:05 UTC 2025


On Tue, 4 Mar 2025 07:49:23 GMT, Axel Boldt-Christmas <aboldtch at openjdk.org> wrote:

> The only directly heap allocated, constructed object of types that are overaligned because of ZCACHE_ALIGNED is ZCollectedHeap. The other are either in static storage or contained in (and constructed as part of) ZCollectedHeap. So we only need to fix ZCollectedHeap allocation. 
> 
> As the CollectedHeap is only ever created once and is never destroyed, we can simply align the allocation and create an unfreeable pointer.
> 
> This implementation imposes that `ZCacheLineSize` is a power of two, but we already have this requirement elsewhere (e.g. `ZContendedStorage`).
> 
> Testing:
>  * tier 1 through tier 5 Oracle supported platforms
>  * GHA

This pull request has now been integrated.

Changeset: fb0efbe8
Author:    Axel Boldt-Christmas <aboldtch at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/fb0efbe87403fa2f1263c9b916db1a3a3b037eeb
Stats:     17 lines in 1 file changed: 15 ins; 0 del; 2 mod

8333578: Fix uses of overaligned types induced by ZCACHE_ALIGNED

Reviewed-by: stefank, kbarrett

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

PR: https://git.openjdk.org/jdk/pull/23885


More information about the hotspot-gc-dev mailing list