Re: [mp2 filters] allocating modperl_wbucket_t or not
Philippe M. Chiasson wrote: 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++ Thanks folks, now committed. __ Stas BekmanJAm_pH --> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [mp2] mod_perl test suite fails
Volker Kroll wrote:
[...]
Hmm, does not work for me, I modified it slightly:
use File::Spec::Functions qw(catfile);
my($uid, $gid) = (getpwnam(qq[nobody]))[2..3];
$( = $) = $gid+0;
die qq[failed to change gid to $gid] if $( != $gid;
$< = $> = $uid+0;
die qq[failed to change uid to $uid] if $< != $uid;
my $dir = qq[/root];
my $file = catfile $dir, qq[.apache-test-file-$$-].time.int(rand);
END { unlink $file };
# -w
open TEST, qq[>$file] or die qq[failed to open $file: $!];
# -x
-f $file or die qq[$file cannot be looked up];
close TEST;
# -r
opendir DIR, $dir or die qq[failed to open dir $dir: $!];
defined readdir DIR or die qq[failed to read dir $dir: $!];
close DIR;
# all tests passed
print q{OK};
perfect, I must have been dreaming ;)
and started it out of a file.
I got:
failed to open /root/.apache-test-file-8981-10712397220: Permission
denied at test line 11.
Great. I have now integrated this test into Apache-Test. Can you please verify
that modperl-2.0's 'make test' refuses to run when modperl-2.0 is checked out
under /root? Please use the latest cvs version:
http://perl.apache.org/download/source.html#Development_mod_perl_2_0_Source_Distribution
Thanks.
__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
