[ 
https://issues.apache.org/jira/browse/THRIFT-2541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14053143#comment-14053143
 ] 

Jens Geyer commented on THRIFT-2541:
------------------------------------

Hi [~cpper],

What about {{std::numeric_limits<int>::max()}} or {{INT_MAX}}?
http://en.cppreference.com/w/cpp/types/numeric_limits/max
http://en.cppreference.com/w/cpp/types/climits

{quote}
initialised to -1 of type uint32_t, which is the maximum value of unsigned 
int32,
{quote}

The {{-1}} is a signed value, and since there is neither a cast nor a comment 
... it looks like a simple typo. 
I guarantee you that at some point in the future someone is going to "fix" this 
- to the wrong value. 


> reclaim TFramedTransport's read and write buffers for thrift cpp
> ----------------------------------------------------------------
>
>                 Key: THRIFT-2541
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2541
>             Project: Thrift
>          Issue Type: Improvement
>          Components: C++ - Library
>    Affects Versions: 0.9.1
>            Reporter: Huabin
>             Fix For: 0.9.2
>
>         Attachments: THRIFT-2541.patch
>
>
> The internal read and write buffer holds more and more memory but with no 
> chance to reclaim , which causes service that use thrift client pool takes a 
> large amount of memory. A thresh can be set that trades off between malloc 
> and free memory frequently and amount of memory usage.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to