You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Mario Emmenlauer (Jira)" <ji...@apache.org> on 2020/02/24 14:32:00 UTC
[jira] [Created] (THRIFT-5114) Simplify the computation of the size
of TMemoryBuffer
Mario Emmenlauer created THRIFT-5114:
----------------------------------------
Summary: 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
Reporter: Mario Emmenlauer
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)