Date: Mon, 1 Oct 2001 22:24:51 -0500 From: Dan Nelson <dnelson@allantgroup.com> To: Mike Silbersack <silby@silby.com> Cc: freebsd-arch@FreeBSD.ORG Subject: Re: Reading physical memory in a cross-platform way Message-ID: <20011001222450.A39302@dan.emsphone.com> In-Reply-To: <20011001214234.W98394-100000@achilles.silby.com> References: <20011001214234.W98394-100000@achilles.silby.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Oct 01), Mike Silbersack said: > 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? It looks like 'physmem' (aka the hw.physmem sysctl) is defined the same way on all the systems; are you looking for something else? -- Dan Nelson dnelson@allantgroup.com 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?20011001222450.A39302>