Details
-
Improvement
-
Status: Closed
-
Trivial
-
Resolution: Fixed
-
None
-
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
- causes
-
THRIFT-5716 TMemoryBuffer resizing might shrink the buffer size due to uint32_t overflow
- Closed
- links to