From owner-freebsd-arch Wed Oct 3 11: 6:11 2001 Delivered-To: freebsd-arch@freebsd.org Received: from avocet.mail.pas.earthlink.net (avocet.mail.pas.earthlink.net [207.217.121.50]) by hub.freebsd.org (Postfix) with ESMTP id A55E837B403 for ; Wed, 3 Oct 2001 11:06:05 -0700 (PDT) Received: from dialup-209.245.142.238.dial1.sanjose1.level3.net ([209.245.142.238] helo=mindspring.com) by avocet.mail.pas.earthlink.net with esmtp (Exim 3.32 #2) id 15oqPD-0002s2-00; Wed, 03 Oct 2001 11:06:03 -0700 Message-ID: <3BBB53BB.84647DC1@mindspring.com> Date: Wed, 03 Oct 2001 11:06:51 -0700 From: Terry Lambert Reply-To: tlambert2@mindspring.com X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Mike Silbersack Cc: freebsd-arch@freebsd.org Subject: Re: Reading physical memory in a cross-platform way References: <20011001214234.W98394-100000@achilles.silby.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 Mike Silbersack wrote: > 1. Is there a variable / function which contains the size of memory > across all platforms that I am missing? sysctl -A | grep -i mem > 2. If not, is there a problem if I add a u_int64_t containing the size of > physical memory in bytes in machdep.c for each architecture? If this number isn't what you are looking for, I have a patch that adds a sysctl for the number of pages of physical memory, the same as is reported by the kernel at boot time, which I could send you. Let me know at my clickarray.com address (which is "terry"). -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message