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

Joel Sikström jsikstro at openjdk.org
Thu Sep 11 13:42:33 UTC 2025


> 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

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/27224/files
  - new: https://git.openjdk.org/jdk/pull/27224/files/35c6057a..dba2ab46

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=27224&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=27224&range=00-01

  Stats: 9 lines in 1 file changed: 0 ins; 0 del; 9 mod
  Patch: https://git.openjdk.org/jdk/pull/27224.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/27224/head:pull/27224

PR: https://git.openjdk.org/jdk/pull/27224


More information about the hotspot-runtime-dev mailing list