perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From auta...@apache.org
Subject svn commit: r419948 - /perl/Apache-SizeLimit/trunk/lib/Apache/SizeLimit.pm
Date Fri, 07 Jul 2006 18:31:00 GMT
Author: autarch
Date: Fri Jul  7 11:31:00 2006
New Revision: 419948

URL: http://svn.apache.org/viewvc?rev=419948&view=rev
Log:
Fix for shared size calculations on BSD from Phil G.

Modified:
    perl/Apache-SizeLimit/trunk/lib/Apache/SizeLimit.pm

Modified: perl/Apache-SizeLimit/trunk/lib/Apache/SizeLimit.pm
URL: http://svn.apache.org/viewvc/perl/Apache-SizeLimit/trunk/lib/Apache/SizeLimit.pm?rev=419948&r1=419947&r2=419948&view=diff
==============================================================================
--- perl/Apache-SizeLimit/trunk/lib/Apache/SizeLimit.pm (original)
+++ perl/Apache-SizeLimit/trunk/lib/Apache/SizeLimit.pm Fri Jul  7 11:31:00 2006
@@ -247,8 +247,15 @@
     return ( $size, 0 );
 }
 
+# rss is in KB but ixrss is in BYTES.
+# This is true on at least FreeBSD, OpenBSD, NetBSD, and Darwin - Phil
+# Gollucci
 sub _bsd_size_check {
-    return ( BSD::Resource::getrusage() )[ 2, 3 ];
+    my @results = BSD::Resource::getrusage();
+    my $max_rss   = $results[2];
+    my $max_ixrss = int ( $results[3] / 1024 );
+
+    return ( $max_rss, $max_ixrss );
 }
 
 sub _win32_size_check {



Mime
View raw message