RFR: 8367413: Use size_t instead of julong in runtime/arguments.cpp [v2]

Joel Sikström jsikstro at openjdk.org
Fri Sep 12 07:11:24 UTC 2025


On Thu, 11 Sep 2025 13:46:27 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

>> Joel Sikström has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   size_t casts for 32-bit part of test_arguments.cpp
>
> src/hotspot/share/runtime/arguments.cpp line 1526:
> 
>> 1524:       FLAG_SET_ERGO(MaxRAM, (uint64_t)phys_mem);
>> 1525:     } else {
>> 1526:       phys_mem = (size_t)MaxRAM;
> 
> Pre-existing: I wonder if this should be `MIN2(MaxRAM, SIZE_MAX)` to handle 32-bit systems.

>From the discussion surrounding [JDK-8367485](https://bugs.openjdk.org/browse/JDK-8367485), we support this since we could run a 32-bit VM on a 64-bit machine.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27224#discussion_r2343223296


More information about the hotspot-runtime-dev mailing list