RFR: 8321512: runtime/CommandLine/OptionsValidation/TestOptionsWithRanges.java fails on 32-bit platforms
Thomas Schatzl
tschatzl at openjdk.org
Tue Jan 23 10:51:35 UTC 2024
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
-------------
Commit messages:
- remove unnecessary optimization
Changes: https://git.openjdk.org/jdk/pull/17532/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=17532&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8321512
Stats: 5 lines in 1 file changed: 0 ins; 5 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/17532.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/17532/head:pull/17532
PR: https://git.openjdk.org/jdk/pull/17532
More information about the hotspot-gc-dev
mailing list