[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Brigade memory lifetime & leaks

On Tue, Jun 5, 2018 at 1:26 PM, Stefan Eissing
<stefan.eissing@xxxxxxxxxxxxx> wrote:
>> Am 05.06.2018 um 10:46 schrieb Joe Orton <jorton@xxxxxxxxxx>:
>> Another choice is to allocate the brigade structure using the bucket
>> allocator and actually free it on _destroy().  Anybody around who can
>> remember why we used a pool allocation for that structure from the
>> beginning?
> How about having the apr_bucket_brigade struct on the stack as an option?

I had similar issue for r1822596 and proposed to have a c->tmpbb
available (to be cleared after use, there are several similar places
where it could be useful), but the semantic wasn't really accepted so
Rüdiger proposed to use c->notes to create that brigade once only
where needed.

It could work I think here too.