From owner-freebsd-arch Mon Oct 1 19:46:14 2001 Delivered-To: freebsd-arch@freebsd.org Received: from silby.com (cb34181-a.mdsn1.wi.home.com [24.14.173.39]) by hub.freebsd.org (Postfix) with ESMTP id 61CEF37B407 for ; Mon, 1 Oct 2001 19:46:11 -0700 (PDT) Received: (qmail 98937 invoked by uid 1000); 2 Oct 2001 02:46:09 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 2 Oct 2001 02:46:09 -0000 Date: Mon, 1 Oct 2001 21:46:09 -0500 (CDT) From: Mike Silbersack To: Subject: Reading physical memory in a cross-platform way Message-ID: <20011001214234.W98394-100000@achilles.silby.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Right now I'm working on autoscaling files/procs/etc. It's an easy job, except for one problem I keep bumping my head into: figuring out how much memory the system has. It appears that for each architecture we store the size of physical memory in a different way, requiring conversion functions that are different for each architecture. This makes my job difficult. :) So, two questions: 1. Is there a variable / function which contains the size of memory across all platforms that I am missing? 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? Thanks, Mike "Silby" Silbersack To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message