RFR: 8266349: Pass down requested page size to reserve_memory_special

Stefan Johansson sjohanss at openjdk.java.net
Wed May 5 12:57:52 UTC 2021


On Wed, 5 May 2021 12:33:32 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> src/hotspot/os/linux/os_linux.cpp line 3968:
>> 
>>> 3966:   assert(is_aligned(alignment, os::vm_allocation_granularity()), "Must be");
>>> 3967:   assert(is_power_of_2(page_size), "Must be");
>>> 3968:   assert(bytes >= page_size, "Shouldn't allocate large pages for small sizes");
>> 
>> We could replace these two asserts with _page_sizes.contains.
>
> .. Well, the first one at least.

Was just about to say just that :) The second one should trigger on the case you mention, if we ever tried to use large pages for too small sizes.

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

PR: https://git.openjdk.java.net/jdk/pull/3878


More information about the hotspot-dev mailing list