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
arean the entire lifetime of the program.

On Mon, Apr 9, 2018 at 8:07 AM John Scholvin <john.schol...@gmail.com>
wrote:

> 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 large number of messages with relatively short lifespans.
> What happens is that the arena just grows in size until application exit,
> which won't work. If there's another way to support this workflow without
> all the heap traffic of the default implementation, I'd love to hear about
> it.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Protocol Buffers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to protobuf+unsubscr...@googlegroups.com.
> To post to this group, send email to protobuf@googlegroups.com.
> Visit this group at https://groups.google.com/group/protobuf.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to