JDK-8257588 : Make os::_page_sizes a bitmask
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 16
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-12-02
  • Updated: 2021-01-07
  • Resolved: 2020-12-07
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 16
16 b28Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
While discussing JDK-8243315, and aiming to make planned changes like JDK-8256155 easier:

```
size_t            os::_page_sizes[os::page_sizes_max];
```

is an array used to keep all page sizes the hotspot can use. It is sorted by size and filled in at initialization time.

Coding dealing with this can be simplified by making this a set (which is very easy since all page sizes are power-2-values so they lend themselves nicely to a bitmap).

That has the following advantages:
- makes adding new sizes simple since we do not have to re-sort the array. Coding is easier to read too.
- it makes it possible to encode a set of page sizes in one number, so we can hand a set-of-page-sizes around as a value.

Comments
Changeset: 8e8e5845 Author: Thomas Stuefe <stuefe@openjdk.org> Date: 2020-12-07 10:32:05 +0000 URL: https://git.openjdk.java.net/jdk/commit/8e8e5845
07-12-2020