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

Move size reducing operations to GrowableArrayWithAllocator

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • None
    • hotspot
    • None

      We want to change GrowableArray to not initialize elements in the range from size to capacity. (JDK-8319115)

      We also want to change GrowableArray to be something like standard C++ "allocator aware", to permit allocator-using element types (like GrowableArray!). (No JBS issue yet, I think.) One reason for doing this is to allow detecting that the allocator is an arena style allocator and skipping element destruction.

      As a precondition to those, all operations that change the size need to have access to the allocator. All operations that may increase the size might need to grow the underlying storage, so are already provided at the GrowableArrayWithAllocator layer. But operations that reduce the size are in GrowableArrayView, or even GrowableArrayBase. Those operations should be moved to GrowableArrayWithAllocator.

            kbarrett Kim Barrett
            kbarrett Kim Barrett
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: