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

G1: Use more accurate integer type for collection set length

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 18
    • 18
    • hotspot
    • gc
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: