RFR: JDK-8257588: Make os::_page_sizes a bitmask [v4]

Thomas Stuefe stuefe at openjdk.java.net
Fri Dec 4 16:51:19 UTC 2020


On Fri, 4 Dec 2020 14:08:09 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:

>> Thomas Stuefe has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Feedback Stefan K
>
> src/hotspot/share/runtime/os.cpp line 1894:
> 
>> 1892: size_t os::PageSizes::smallest() const {
>> 1893:   assert(min_page_size() > 0, "Sanity");
>> 1894:   return next_larger(min_page_size() / 2);
> 
> I'm not sure why you use min_page_size() / 2 instead of another small enough power_of_2, say the smallest one:
> return next_larger(1);
> and thereby get rid of the dependency on the odd min_page_size().

True. Earlier implementation had a lop in next_larger. But now it does not matter. 1 is fine.

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

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


More information about the hotspot-dev mailing list