On Thu, 2003-12-11 at 11:35, Stas Bekman wrote: > Stas Bekman wrote: > > Geoffrey Young wrote: > > > >> > >> Stas Bekman wrote: > >> > >>> Currently we allocate a wbucket of type modperl_wbucket_t for each > >>> filter invocation. If it's not a streaming filter (i.e. manipulates > >>> bucket brigades or doesn't use read/print) it's never going to need > >>> wbucket. wbucket consumes 16404 bytes, the filter struct without > >>> wbucket consumes 60 bytes. In order not to penalize non-streaming > >>> filters, I suggest not to allocate wbucket if and not until it's first > >>> used. > > > > > > I'm getting too comphy with pools and this patch of course forgets to > > free memory, now that it has moved to malloc. > > Here is a proper patch, which now frees the memory for wbucket as well.
Looks like a safe and good idea to me : stas++ > Index: src/modules/perl/modperl_filter.c > =================================================================== > RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_filter.c,v > retrieving revision 1.77 > diff -u -r1.77 modperl_filter.c > --- src/modules/perl/modperl_filter.c 11 Dec 2003 07:38:41 -0000 1.77 > +++ src/modules/perl/modperl_filter.c 11 Dec 2003 19:26:57 -0000 > @@ -20,6 +20,25 @@ > > [...] -- -------------------------------------------------------------------------------- Philippe M. Chiasson /gozer\@(cpan|ectoplasm)\.org/ 88C3A5A5 (122FF51B/C634E37B) http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3 A5A5 Q: It is impossible to make anything foolproof because fools are so ingenious. perl -e'$$=\${gozer};{$_=unpack(P7,pack(L,$$));/^JAm_pH\n$/&&print||$$++&&redo}'
signature.asc
Description: This is a digitally signed message part
