RFR: 8299030: Refactor ReservedSpace::reserve

David Holmes dholmes at openjdk.org
Wed Dec 21 09:39:52 UTC 2022


On Tue, 20 Dec 2022 13:55:02 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

>> src/hotspot/share/memory/virtualspace.cpp line 266:
>> 
>>> 264:     log_on_large_pages_failure(requested_address, size);
>>> 265:     // Now fall back to normal reservation.
>>> 266:     page_size = os::vm_page_size();
>> 
>> In the original code the setting of `page_size` appears to relate to the comment about falling back, but it would appear that comment is really just about falling through to the case three code - is that right? If so the assertion would be a little clearer if put directly after the do-while loop (though it's really validating the loop termination condition anyway).
>
>> In the original code the setting of page_size appears to relate to the comment about falling back, but it would appear that comment is really just about falling through to the case three code - is that right?
> 
> I'd say it's both -- we are falling to Case 3 _and_ `page_size` needs to have a suitable value for Case 3.

Ok - no big deal.

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

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


More information about the hotspot-runtime-dev mailing list