Re: [protobuf] return to arena (C++)

2018-04-10 Thread 'Feng Xiao' via Protocol Buffers
Arena is not supposed to be used as a memory pool. The recommended pattern is to use one arena per rpc request/response. You can tweak that to one arena multiple rpc request/response but the number of messages you want to put into the arena should be limited. It won't work well if you use one

[protobuf] return to arena (C++)

2018-04-09 Thread John Scholvin
Can someone confirm for me that there's no way to return a message's memory to the arena when you're done with it? I was expecting the arena to work something like boost::pool where I can give memory back when I'm done with it, but it appears that's not part of the API here. My use case is a