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

Stop using mtNone as marker for CHeap allocations in GrowableArray

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 20
    • 20
    • hotspot
    • None
    • gc
    • b24

    Description

      Today we use mtNone to denote that a GrowableArray should *NOT* be backed by a CHeap allocated array.

      I've gotten feedback that it would probably be good to limit the usage of mtNone, and at some point maybe completely remove it.

      This patch takes a small step to remove mtNone from the GrowableArray. What's left is only asserts to forbid that value. Those asserts will be trivial to remove when/if mtNone is removed.

      Just like in the proposed patch to make MEMFLAGS non-optional in CHeapBitMap (see JDK-JDK-8296774), I have thrown around the parameter order for GrowableArray. When looking at the changes to the usages of CHeap-backed GrowableArrays it becomes apparent that all of these usages where forced to provide a value for the initial capacity. When MEMFLAGS move to the front, we can now skip having to figure an initial capacity.

      Attachments

        Issue Links

          Activity

            People

              stefank Stefan Karlsson
              stefank Stefan Karlsson
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: