Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-5114

Simplify the computation of the size of TMemoryBuffer

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • None
    • 0.14.0
    • C++ - Library
    • None

    Description

      The updated size of TMemoryBuffer is currently computed in a loop. This is a bit hard to read, i.e. it is not very clear what the size will be updated to or what policy this follows. The computed sizes are not necessarily powers of two, but rather arbitrary sizes.

      I propose to simplify this to an explicit formula that allocates a size equal to the next larger power of two.

      Attachments

        Issue Links

          Activity

            People

              emmenlau Mario Emmenlauer
              emmenlau Mario Emmenlauer
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h 10m
                  2h 10m