perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: svn commit: r109987 - /perl/modperl/trunk/Changes /perl/modperl/trunk/lib/Apache/SizeLimit.pm
Date Mon, 06 Dec 2004 16:44:41 GMT
stas@apache.org wrote:

> Added: perl/modperl/trunk/lib/Apache/SizeLimit.pm

> +    # unpack ProcessMemoryCounters structure
> +    my ($cb,                         $PageFaultCount,
> +        $PeakWorkingSetSize,         $WorkingSetSize,
> +        $QuotaPeakPagedPoolUsage,    $QuotaPagedPoolUsage,
> +        $QuotaPeakNonPagedPoolUsage, $QuotaNonPagedPoolUsage,
> +        $PagefileUsage,              $PeakPagefileUsage)
> +        = unpack $pmem_struct, $pProcessMemoryCounters;
> +
> +    # only care about peak working set size
> +    my $size = int($PeakWorkingSetSize / 1024);

why creating 10 variables when only 1 is needed? won't this work just as well?

   my $PeakWorkingSetSize = (unpack $pmem_struct, $pProcessMemoryCounters)[2];

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message