perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clinton Gormley <cl...@traveljury.com >
Subject Re: After retrieving data from DB, the memory doesn't seem to be freed up
Date Sat, 12 May 2007 06:59:03 GMT

> #******************************************
> use strict;
> package mypack;
> 
> my $tmp;
> $tmp .= 'a';
> print '$tmp value: ' . $tmp . ' - address: ' . \$tmp . "\n";
> #******************************************
> 
> I am running this script in a ModPerl::Registry environment.
> 
> In this situation, the first time I'm running the script, I can see this:
> 
> main $tmp: a - address: SCALAR(0xd725e0)
> 
> And then, in subsequent calls:
> 
> $tmp value: a - address: SCALAR(0xd77bf4)
> $tmp value: a - address: SCALAR(0xd77d20)
> $tmp value: a - address: SCALAR(0xd77d38)
> 

Could it be that the request is being answered by different threads,
each one with their own copy of the $tmp variable?

Try restricting apache to using only a single thread, and repeat the
test.

Clint


Mime
View raw message