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

Thomas Stuefe stuefe at openjdk.java.net
Fri Dec 4 05:39:59 UTC 2020


On Thu, 3 Dec 2020 21:25:28 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 Thomas
>
> src/hotspot/share/runtime/os.hpp line 106:
> 
>> 104:   // A simple value class holding a set of page sizes (similar to sigset_t)
>> 105:   class PagesizeSet {
>> 106:     uintx _v;
> 
> All in-parameters are size_t. It seems like this could be size_t as well.

This is my personal taste; I dislike keeping anything a size_t which is not a memory range size (e.g. I dislike its use as an array index). But it does not matter much to me here since size_t is guaranteed to be unsigned.

> src/hotspot/share/runtime/os.cpp line 1863:
> 
>> 1861: 
>> 1862: size_t os::PagesizeSet::next_smaller(size_t pagesize) const {
>> 1863:   assert(is_power_of_2(pagesize), "pagesize must be a power of 2: " INTPTR_FORMAT, pagesize);
> 
> You're using INTPR_FORMAT to print a size_t. I guess this is done to print hex values. We have a SIZE_FORMAT_HEX for that use case.

Sure

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

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


More information about the hotspot-dev mailing list