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

Joel Sikström jsikstro at openjdk.org
Thu Sep 11 12:47: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

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

Commit messages:
 - 8367413: Use size_t instead of julong in runtime/arguments.cpp

Changes: https://git.openjdk.org/jdk/pull/27224/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27224&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8367413
  Stats: 74 lines in 3 files changed: 0 ins; 3 del; 71 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