GrowableArray should support capacity management

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 20
    • Affects Version/s: 20
    • Component/s: hotspot
    • None
    • b21

      GrowableArray currently supports setting an initial capacity at construction time, and querying the current capacity via max_length(). It does not support functions like reserve and shrink_to_fit provided by std::vector. It's possible to work around that lack, but requires some non-trivial effort. (See StringDedupTable for example.) We should add those functions. those functions. While we're at it, rename max_len to capacity, for consistency with std::vector and to aid discovery by someone familiar with that class.

            Assignee:
            Kim Barrett
            Reporter:
            Kim Barrett
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: