From owner-freebsd-arch Tue Feb 25 9:53:55 2003 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1229B37B401 for ; Tue, 25 Feb 2003 09:53:54 -0800 (PST) Received: from mail.speakeasy.net (mail17.speakeasy.net [216.254.0.217]) by mx1.FreeBSD.org (Postfix) with ESMTP id A1C4C43FBD for ; Tue, 25 Feb 2003 09:53:52 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: (qmail 20832 invoked from network); 25 Feb 2003 17:53:56 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail17.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 25 Feb 2003 17:53:56 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.6/8.12.6) with ESMTP id h1PHqUhT020300; Tue, 25 Feb 2003 12:52:32 -0500 (EST) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20030225160527.W9462-100000@gamplex.bde.org> Date: Tue, 25 Feb 2003 12:53:56 -0500 (EST) From: John Baldwin To: Bruce Evans Subject: Re: Fw: Proposed new sysctl MIB nodes Cc: arch@FreeBSD.ORG, "M. Warner Losh" , Marcel Moolenaar Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 25-Feb-2003 Bruce Evans wrote: > On Mon, 24 Feb 2003, Marcel Moolenaar wrote: > >> On Mon, Feb 24, 2003 at 05:47:42PM -0700, M. Warner Losh wrote: >> > >> > From: Jason R Thorpe >> > >> > I'd like to propose new HW_PHYSPAGES and HW_USERPAGES MIB nodes that >> > return the same information, but in a 32-bit page count, instead. The >> > implementation is left as an exercise to the reader. I just want to get >> > consensus on the names, so that I can tell the GCC people about it, and >> > have it work on all the BSD platforms (as their current sysctl code does). >> >> What's the reason to not use a 64-bit entity whether it represents >> bytes or pages? > > Under FreeBSD, the sysctl return an unsigned long, so they already > return a 64-bit entity on machines which happen to have 64-bit longs. > Under NetBSD, the sysctls return a 32-bit signed int, so they only > already return 64 non-overflowing bits on machines which happen to > have 65-bit ints. This gives the following pedantic wrongness for > always using a 64-bit entity for bytes: So the sysctl should be returning size_t's then? :) -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message