Uploaded image for project: 'Lucy'
  1. Lucy
  2. LUCY-97

Consolidate algorithms for incremental array growth

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • Core
    • None

    Description

      The problem of incremental array growth affects several of our classes:
      CharBuf, ByteBuf, BitVector, VArray, and others yet to be submitted. Ideally,
      the growth algorithm should...

      • Overestimate by enough to prevent pathological reallocation, but not by
        so much as to significantly increase overall memory footprint.
      • Round up so that allocation requests are multiples of the architecture's
        word size.
      • Grow faster at small sizes.

      To apply this logic consistently, we can isolate it in a new function,
      Memory_oversize().

      Attachments

        1. oversize.diff
          19 kB
          Marvin Humphrey

        Activity

          People

            marvin Marvin Humphrey
            marvin Marvin Humphrey
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: