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

G1: HeapRegion::GrainBytes, GrainWords, and CardsPerRegion should be size_t

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 7u2
    • Fix Version/s: hs23
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
      gc
    • Resolved In Build:
      b02
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Not verified

      Backports

        Description

        As part of the review comments for 7092245, it was suggested that a more complete solution would be to redeclare HeapRegion::GrainBytes as a size_t. Currently it is declared as an int.

        The size_t type is unsigned. So while it is unlikely we will need to be able to represent a heap region size > 2G in the next decade or so, changing the declaration will help type checking.

        There are 2 other values associated with heap region size that should probably be changed from int to size_t too: GrainWords and CardsPerRegion.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                johnc John Cuthbertson
                Reporter:
                johnc John Cuthbertson
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: