RFR: JDK-8312018: Improve reservation of class space and CDS [v5]

Thomas Stuefe stuefe at openjdk.org
Tue Aug 22 05:46:27 UTC 2023


On Tue, 22 Aug 2023 04:32:36 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> Thomas Stuefe has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Roman: better comment in metaspaceShared
>>  - Changes to os::vm_min_addr
>
> src/hotspot/share/memory/metaspace.cpp line 649:
> 
>> 647:   if (result != nullptr) {
>> 648:     rs = ReservedSpace::space_for_range(result, size, Metaspace::reserve_alignment(),
>> 649:                                                       os::vm_page_size(), false, false);
> 
> Should we check that result is aligned by both `Metaspace::reserve_alignment()` and `os::vm_page_size()`?
> 
> Not directly part of this change, but I think the existing function `ReservedSpace::space_for_range()` should add 
> 
> 
> assert(is_aligned(alignment, page_size), ....);

Makes sense.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15041#discussion_r1300978027


More information about the hotspot-runtime-dev mailing list