RFR: 8367413: Use size_t instead of julong in runtime/arguments.cpp [v2]
Joel Sikström
jsikstro at openjdk.org
Fri Sep 12 07:20:28 UTC 2025
On Thu, 11 Sep 2025 13:42:33 GMT, Joel Sikström <jsikstro at openjdk.org> wrote:
>> Hello,
>>
>> There are several unnecessary uses of the julong type in arguments.cpp that could use size_t instead to fit in better with surrounding code. Almost all flags that are read in arguments.cpp are size_t, and the os functions it interacts with were changed from julong to size_t in [JDK-8357086](https://bugs.openjdk.org/browse/JDK-8357086) or are already taking in size_t.
>>
>> The main usage of julong in runtime/arguments.cpp is in Arguments::set_heap_size() and Arguments::set_aggressive_heap_flags(), where there are a lot of casts from julong types to size_t which could be removed with this change.
>>
>> Testing:
>> * Running through Oracle's tier1-3 on all Oracle supported platforms
>
> 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
When looking at this we found some irregularities with the code that is being changed in this PR when running in a 32-bit VM.
I think we should hold off on this until there is a solution in place for [JDK-8367485](https://bugs.openjdk.org/browse/JDK-8367485), so I'll move this to a draft in the meantime.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/27224#issuecomment-3284069670
More information about the hotspot-runtime-dev
mailing list