G1: Use more accurate integer type for collection set length

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 18
    • Affects Version/s: 18
    • Component/s: hotspot
    • gc
    • b12

      `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`.

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

              Created:
              Updated:
              Resolved: