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.
```
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.
Attachments
Issue Links
- relates to
-
JDK-8257989 Error in gtest os_page_size_for_region_unaligned after 8257588
- Resolved
-
JDK-8243315 ParallelScavengeHeap::initialize() passes GenAlignment as page size to os::trace_page_sizes instead of actual page size
- Resolved
-
JDK-8256155 Allow multiple large page sizes to be used on Linux
- Resolved