sinomiko commented on PR #2497: URL: https://github.com/apache/brpc/pull/2497#issuecomment-1882382246
借问个问题  这种被socket read创建的io block被 其他类似压缩/解压通过tls共享的io block有什么办法强制回收; 如果业务中 收包很大,挂到tls共享出来了,解压/解压通过也可能用这块io buf的block。 如果socket不断开,这块io buf一直在; 可否主动调用这个代码,强制socket归还 block m->_read_buf.return_cached_blocks(); ``` m->AddInputMessages(1); // Calculate average size of messages const size_t cur_size = m->_read_buf.length(); if (cur_size == 0) { // _read_buf is consumed, it's good timing to return blocks // cached internally back to TLS, otherwise the memory is not // reused until next message arrives which is quite uncertain // in situations that most connections are idle. m->_read_buf.return_cached_blocks(); } ``` -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
