RFR: 8299030: Refactor ReservedSpace::reserve

David Holmes dholmes at openjdk.org
Tue Dec 20 05:13:04 UTC 2022


On Mon, 19 Dec 2022 14:05:41 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

> Simple refactoring and removing some unnecessary operations.
> 
> Test: hotspot_gc

One minor nit but otherwise this seems okay. Thanks.

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).

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

Marked as reviewed by dholmes (Reviewer).

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


More information about the hotspot-runtime-dev mailing list