RFR: 8321512: runtime/CommandLine/OptionsValidation/TestOptionsWithRanges.java fails on 32-bit platforms

Thomas Schatzl tschatzl at openjdk.org
Wed Jan 24 12:03:36 UTC 2024


On Tue, 23 Jan 2024 11:40:38 GMT, Ivan Walulya <iwalulya at openjdk.org> wrote:

>> Hi all,
>> 
>>   please review this fix for a failing test on 32 bit platforms. In particular, for the `G1CardSetArray` card set container the existing code tries to optimize memory usage by changing the number of entries (`G1RemSetArrayOfCardsEntries`, each entry taking 2 bytes) so that the resulting memory usage is 8 bytes aligned (because the allocator used aligns to 8 bytes anyway, so why not use that space).
>> 
>> On 32 bit platforms, the calculation results in an invalid size (> 2^16).
>> 
>> The suggested fix removes this automatic container size optimization: it is only used for the rare case when the knowledgeable user modifies the defaults; in that case I propose to have the user worry about optimal usage of the memory too, and simplify the code.
>> 
>> Testing: failing test passes
>> 
>> Thanks,
>>   Thomas
>
> Marked as reviewed by iwalulya (Reviewer).

Thanks @walulyai @shipilev for your reviews

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

PR Comment: https://git.openjdk.org/jdk/pull/17532#issuecomment-1907986046


More information about the hotspot-gc-dev mailing list