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

David Holmes dholmes at openjdk.org
Mon Dec 9 04:12:36 UTC 2024


On Fri, 6 Dec 2024 11:03:34 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:

> 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

Seems reasonable. None of the arguments to `CodeHeap::reserve` are documented anyway and there is only a single caller.

Thanks

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

Marked as reviewed by dholmes (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/22604#pullrequestreview-2487684624


More information about the hotspot-dev mailing list