You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by GitBox <gi...@apache.org> on 2022/07/19 08:56:15 UTC
[GitHub] [incubator-brpc] JackyChen-Kuang opened a new issue, #1845: butil::IOBuf中内存没有被释放
JackyChen-Kuang opened a new issue, #1845:
URL: https://github.com/apache/incubator-brpc/issues/1845
我用Postman对服务端进行http请求时在Body中带了一个文件,通过butil::Controller::request_attchment()获取到Body中的文件数据并使用butil::IOBuf变量储存,后来文件读写完成后respond了消息回去,发现request_attchment()中内存没有被释放掉,有什么方法可以释放这些block占用的内存。

--
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.
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org
[GitHub] [incubator-brpc] JackyChen-Kuang closed issue #1845: butil::IOBuf中block占用的内存没有被释放
Posted by GitBox <gi...@apache.org>.
JackyChen-Kuang closed issue #1845: butil::IOBuf中block占用的内存没有被释放
URL: https://github.com/apache/incubator-brpc/issues/1845
--
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.
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org
[GitHub] [incubator-brpc] wwbmmm commented on issue #1845: butil::IOBuf中block占用的内存没有被释放
Posted by GitBox <gi...@apache.org>.
wwbmmm commented on issue #1845:
URL: https://github.com/apache/incubator-brpc/issues/1845#issuecomment-1212744374
> 
这个new出来的IOBuf用完有delete吗?
--
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.
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org
[GitHub] [incubator-brpc] JackyChen-Kuang commented on issue #1845: butil::IOBuf中内存没有被释放
Posted by GitBox <gi...@apache.org>.
JackyChen-Kuang commented on issue #1845:
URL: https://github.com/apache/incubator-brpc/issues/1845#issuecomment-1188786098

--
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.
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org
[GitHub] [incubator-brpc] JackyChen-Kuang commented on issue #1845: butil::IOBuf中block占用的内存没有被释放
Posted by GitBox <gi...@apache.org>.
JackyChen-Kuang commented on issue #1845:
URL: https://github.com/apache/incubator-brpc/issues/1845#issuecomment-1244860640
> > 
>
> 这个new出来的IOBuf用完有delete吗?
这个buf是个引用类型,全文是
``` c
butil::IOBuf &buf = new butil::IOBuf(contrikker->request_attachment)
```
试过delete buf还有一些释放内存的函数都没办法释放它
--
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.
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org
[GitHub] [incubator-brpc] wwbmmm commented on issue #1845: butil::IOBuf中block占用的内存没有被释放
Posted by GitBox <gi...@apache.org>.
wwbmmm commented on issue #1845:
URL: https://github.com/apache/incubator-brpc/issues/1845#issuecomment-1244874417
IOBuf底层的block在释放时是不会归还给系统的,而是放在一个池子里,后续新建block的时候可以复用。所以delete buf是无法释放这部分内存的。
--
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.
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org
[GitHub] [incubator-brpc] JackyChen-Kuang commented on issue #1845: butil::IOBuf中内存没有被释放
Posted by GitBox <gi...@apache.org>.
JackyChen-Kuang commented on issue #1845:
URL: https://github.com/apache/incubator-brpc/issues/1845#issuecomment-1188787673
传输了一个120MB的文件,下载完后就一直占用这部分内存了,除非再次请求一个小一点的文件空间才能不占用这么多

--
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.
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org