Date: Mon, 24 Feb 2003 18:12:34 -0800 From: Marcel Moolenaar <marcel@xcllnt.net> To: Garance A Drosihn <drosih@rpi.edu> Cc: "M. Warner Losh" <imp@bsdimp.com>, arch@FreeBSD.ORG Subject: Re: Fw: Proposed new sysctl MIB nodes Message-ID: <20030225021234.GA1835@athlon.pn.xcllnt.net> In-Reply-To: <p05200f1eba807c5b0e1d@[128.113.24.47]> References: <20030224.174742.21056478.imp@bsdimp.com> <20030225005912.GA1583@athlon.pn.xcllnt.net> <p05200f1eba807c5b0e1d@[128.113.24.47]>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Feb 24, 2003 at 08:54:03PM -0500, Garance A Drosihn wrote: > > > 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? > > > >Or to be more presice, an integral entity that can be used to cast > >to from a pointer without data loss? > > Jason first asked his question on the bsd-api mailing list (which > hopefully has people from all the main BSD's on it). In a later > message on that mailing list, he replied to a similar question: > > > How about simply having a total memory count in quads > > instead? That way we won't run out when we pass 2^48 > > or 49th bytes in 10 or 15 years. > > Ok, a u_quad (page count) it is. This isn't really a similar question. On 64-bit machines it's rather odd to use a 32-bit entity to hold the amount of memory. The most logical step is to make it a 64-bit entity, not to increase the granularity. Also, why a sysctl to get the total amount of memory in the box. Isn't getrlimit a much better approach to tune process behaviour? -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net 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?20030225021234.GA1835>