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

G1: Use more accurate integer type for collection set length

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 18
    • Fix Version/s: 18
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
      gc
    • Resolved In Build:
      b12

      Description

      `G1CollectionSet::_collection_set_max_length` is declared `size_t` but it's initialized with a value of `uint`.

      ```
      void G1CollectionSet::initialize(uint max_region_length) {
        ...
        _collection_set_max_length = max_region_length;
        ...
      }
      ```

      Change it to `uint` for consistency.

      Additionally, `_collection_set_cur_length` can be changed to `uint` as well, because of the invariant, `_collection_set_cur_length <= _collection_set_max_length`.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ayang Albert Yang
              Reporter:
              ayang Albert Yang
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: