I ran similar tests to what Torsten had, and definitely noticed a difference in memory usage, but didn't see any leaks in memory. Memory usage is about twice when using $r->print, but it does hit it's max fairly quickly. Memory usage also maxes out fairly quickly using the bucket brigade method. Maybe the leak has been fixed? I'm using apache 2.2.21 and mod_perl 2.05
Thanks, Dimitri On Thu, Mar 18, 2010 at 7:09 AM, Torsten Förtsch <torsten.foert...@gmx.net>wrote: > On Thursday 18 March 2010 11:54:53 Mårten Svantesson wrote: > > I have never worked directly with the APR API but in the example above > > couldn't you prevent the request pool from growing by explicitly reusing > > the bucket brigade? > > > > Something like (not tested): > > > > sub { > > my ($r)=@_; > > > > my $ba=$r->connection->bucket_alloc; > > my $bb2=APR::Brigade->new($r->pool, $ba); > > until( -e '/tmp/stop' ) { > > $bb2->insert_tail(APR::Bucket->new($ba, ("x"x70)."\n")); > > $bb2->insert_tail(APR::Bucket::flush_create $ba); > > $r->output_filters->pass_brigade($bb2); > > $bb2->cleanup(); > > } > > > > $bb2->insert_tail(APR::Bucket::eos_create $ba); > > $r->output_filters->pass_brigade($bb2); > > > > return Apache2::Const::OK; > > } > > > Thanks for pointing to the obvious. This doesn't grow either. > > Torsten Förtsch > > -- > Need professional modperl support? Hire me! (http://foertsch.name) > > Like fantasy? http://kabatinte.net >