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

lib: cpp: test: clarify effect of MemoryPolicy on TMemoryBuffer

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.17.0
    • 0.17.0
    • C++ - Library
    • None

    Description

      My main use case for TMemoryBuffer was that I wanted to be able to call resetBuffer() on OBSERVE buffers and reuse the contents for test cases over and over. While the default resetBuffer() cannot be used for that purpose, the same result can be achieved by calling resetBuffer(ro_mem, ro_mem_size, OBSERVE) as well, so the workaround is fairly trivial.

      While the former implementation would be more convenient in some cases, it makes more sense to have consistent behaviour for all resetBuffer() implementations.

      Added test cases to clarify the effect of MemoryPolicy on TMemoryBuffer behaviour.

      Attachments

        Issue Links

          Activity

            People

              cfriedt Christopher Friedt
              cfriedt Christopher Friedt
              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 - 8h 40m
                  8h 40m