RFR: 8333578: Fix uses of overaligned types induced by ZCACHE_ALIGNED [v2]

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


On Mon, 10 Mar 2025 06:05:30 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
>
> Axel Boldt-Christmas has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Updated comment

Thanks for the reviews

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

PR Comment: https://git.openjdk.org/jdk/pull/23885#issuecomment-2710328082


More information about the hotspot-gc-dev mailing list