triump2020 commented on issue #1136:
URL: https://github.com/apache/incubator-brpc/issues/1136#issuecomment-651244237
@kof02guy 从 ObjectPool 中分配的对象所占用的内存是不会归还给系统的,如果到达最大值,再从里面分配,会返回null.
这个最大值从代码看目前不能调整, 是const 常量.
ObjectPool 适用于分配比较固定大小的
,且生命周期比较短暂的,分配完之后,可能过一会儿就归还给Pool的object。这样ObjectPool 保持一个动态平衡。在这样的场景下, 性能应该很高.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]