git.net

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

Re: Brigade memory lifetime & leaks



> Am 05.06.2018 um 13:50 schrieb Yann Ylavic <ylavic.dev@xxxxxxxxx>:
> 
> 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.

How to avoid using the ->tmpbb in two locations on the "pass it" stack? Is it clear which code will use it?

> 
> 
> Regards,
> Yann.




( ! ) Warning: include(msgfooter.php): failed to open stream: No such file or directory in /var/www/git/apache2-developers/msg04157.html on line 100
Call Stack
#TimeMemoryFunctionLocation
10.0008363544{main}( ).../msg04157.html:0

( ! ) Warning: include(): Failed opening 'msgfooter.php' for inclusion (include_path='.:/var/www/git') in /var/www/git/apache2-developers/msg04157.html on line 100
Call Stack
#TimeMemoryFunctionLocation
10.0008363544{main}( ).../msg04157.html:0