RFR: 8345661: Simplify page size alignment in code heap reservation

Stefan Karlsson stefank at openjdk.org
Fri Dec 6 11:08:11 UTC 2024


While working on a prototype to clean up ReservedSpace ([JDK-8345655](https://bugs.openjdk.org/browse/JDK-8345655)) I noticed that the code that reserves the code heap first aligns the committed memory size towards small pages and then aligns it against the page size that was set up for the ReservedSpace. I suggest that just align to the latter immediately.

I also inlined the one usage of `os::vm_allocation_granularity`.

Testing tier1-3

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

Commit messages:
 - 8345661: Simplify page size alignment in code heap reservation

Changes: https://git.openjdk.org/jdk/pull/22604/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=22604&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8345661
  Stats: 10 lines in 2 files changed: 1 ins; 5 del; 4 mod
  Patch: https://git.openjdk.org/jdk/pull/22604.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/22604/head:pull/22604

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


More information about the hotspot-dev mailing list