Date: Tue, 25 Feb 2003 12:53:56 -0500 (EST) From: John Baldwin <jhb@FreeBSD.org> To: Bruce Evans <bde@zeta.org.au> Cc: arch@FreeBSD.ORG, "M. Warner Losh" <imp@bsdimp.com>, Marcel Moolenaar <marcel@xcllnt.net> Subject: Re: Fw: Proposed new sysctl MIB nodes Message-ID: <XFMail.20030225125356.jhb@FreeBSD.org> In-Reply-To: <20030225160527.W9462-100000@gamplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <thorpej@wasabisystems.com> >> > >> > 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 <jhb@FreeBSD.org> <>< 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20030225125356.jhb>