You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Jens Geyer (Jira)" <ji...@apache.org> on 2020/06/03 21:12:00 UTC

[jira] [Updated] (THRIFT-5114) Simplify the computation of the size of TMemoryBuffer

     [ https://issues.apache.org/jira/browse/THRIFT-5114?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jens Geyer updated THRIFT-5114:
-------------------------------
    Component/s: C++ - Library

> Simplify the computation of the size of TMemoryBuffer
> -----------------------------------------------------
>
>                 Key: THRIFT-5114
>                 URL: https://issues.apache.org/jira/browse/THRIFT-5114
>             Project: Thrift
>          Issue Type: Improvement
>          Components: C++ - Library
>            Reporter: Mario Emmenlauer
>            Assignee: Mario Emmenlauer
>            Priority: Trivial
>             Fix For: 0.14.0
>
>          Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> 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.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)