Return-Path: Delivered-To: apmail-perl-dev-archive@www.apache.org Received: (qmail 22740 invoked from network); 7 Jul 2006 17:13:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 7 Jul 2006 17:13:29 -0000 Received: (qmail 78012 invoked by uid 500); 7 Jul 2006 17:13:28 -0000 Delivered-To: apmail-perl-dev-archive@perl.apache.org Received: (qmail 77830 invoked by uid 500); 7 Jul 2006 17:13:28 -0000 Mailing-List: contact dev-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@perl.apache.org Received: (qmail 77819 invoked by uid 99); 7 Jul 2006 17:13:27 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Jul 2006 10:13:27 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [66.236.219.70] (HELO piccollo.p6m7g8.net) (66.236.219.70) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Jul 2006 10:13:16 -0700 Received: from [172.28.57.204] (office4.tmcs.net [209.104.55.5]) (authenticated bits=0) by piccollo.p6m7g8.net (8.13.6/8.13.6) with ESMTP id k67HB9Ct041461 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO); Fri, 7 Jul 2006 13:11:10 -0400 (EDT) (envelope-from pgollucci@p6m7g8.com) Message-ID: <44AE95A3.2050507@p6m7g8.com> Date: Fri, 07 Jul 2006 10:10:59 -0700 From: "Philip M. Gollucci" Organization: P6M7G8 Inc. User-Agent: Thunderbird 1.5 (X11/20060313) MIME-Version: 1.0 To: Dave Rolsky CC: questions@FreeBSD.org, dev@perl.apache.org Subject: Re: BSD::Resource and getrusage(2) [PATCH] References: <44AE14F5.3020608@p6m7g8.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N > Doesn't that imply that it's in kb per stat clock ticks? I think you read it backwards, but I agree with the outcome. svn diff Index: lib/Apache/SizeLimit.pm =================================================================== --- lib/Apache/SizeLimit.pm (revision 419830) +++ lib/Apache/SizeLimit.pm (working copy) @@ -247,8 +247,15 @@ return ( $size, 0 ); } +## rss is in KB +## ixrss is in BYTES +## this is true on at least FreeBSD, OpenBSD, NetBSD, and Darwin 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 ); } -- ------------------------------------------------------------------------ Philip M. Gollucci (pgollucci@p6m7g8.com) 323.219.4708 Consultant / http://p6m7g8.net/Resume/resume.shtml Senior Software Engineer - TicketMaster - http://ticketmaster.com 1024D/A79997FA F357 0FDD 2301 6296 690F 6A47 D55A 7172 A799 97F "It takes a minute to have a crush on someone, an hour to like someone, and a day to love someone, but it takes a lifetime to forget someone..." --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org For additional commands, e-mail: dev-help@perl.apache.org