perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pgollu...@apache.org
Subject svn commit: r421857 - /perl/modperl/trunk/lib/Apache2/SizeLimit.pm
Date Fri, 14 Jul 2006 10:17:51 GMT
Author: pgollucci
Date: Fri Jul 14 03:17:49 2006
New Revision: 421857

URL: http://svn.apache.org/viewvc?rev=421857&view=rev
Log:
sync with http://svn.apache.org/viewvc?rev=419948&view=rev
over in Apache-SizeLimit land.



Modified:
    perl/modperl/trunk/lib/Apache2/SizeLimit.pm

Modified: perl/modperl/trunk/lib/Apache2/SizeLimit.pm
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/lib/Apache2/SizeLimit.pm?rev=421857&r1=421856&r2=421857&view=diff
==============================================================================
--- perl/modperl/trunk/lib/Apache2/SizeLimit.pm (original)
+++ perl/modperl/trunk/lib/Apache2/SizeLimit.pm Fri Jul 14 03:17:49 2006
@@ -138,8 +138,16 @@
     return ($size, 0);
 }
 
-sub bsd_size_check {
-    return (BSD::Resource::getrusage())[ 2, 3 ];
+# rss is in KB but ixrss is in BYTES.
+# This is true on at least FreeBSD, OpenBSD, NetBSD
+# Philip M. Gollucci
+sub _bsd_size_check {
+
+    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