Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8257588

Make os::_page_sizes a bitmask

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 16
    • Fix Version/s: 16
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b28

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              stuefe Thomas Stuefe
              Reporter:
              stuefe Thomas Stuefe
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: