"J . A . Magallon" wrote:
>
> On 05.11 Martin.Knoblauch wrote:
> >
> > I ask, because I thought the size of kproc could be used to determine
> > the amount of physical memory. If this assumption is wrong, is there
> > another way to achive the goal?
> >
>
> #include <sys/sysinfo.h> // for get_phys_pages()
> #include <unistd.h> // for getpagesize()
>
> ram = get_phys_pages()*getpagesize();
>
Close, but not there :-) What I want is the total physical memory in
the system. Above seems to report only the physical pages available to
the kernel.
Thanks anyway
Martin
-- ------------------------------------------------------------------ Martin Knoblauch | email: Martin.Knoblauch@TeraPort.de TeraPort GmbH | Phone: +49-89-510857-309 IT Services | Fax: +49-89-510857-111 http://www.teraport.de | Mobile: +49-170-4904759 --------------071890BD94909C5D37DA8DDE Content-Type: text/x-vcard; charset=us-ascii; name="Martin.Knoblauch.vcf" Content-Transfer-Encoding: 7bit Content-Description: Card for Martin.Knoblauch Content-Disposition: attachment; filename="Martin.Knoblauch.vcf"begin:vcard n:Knoblauch;Martin tel;cell:+49-170-4904759 tel;fax:+49-89-510857-111 tel;work:+49-89-510857-309 x-mozilla-html:FALSE url:http://www.teraport.de org:TeraPort GmbH;IT-Services adr:;;Garmischer Straße 4;München;Bayern;D-80339;Germany version:2.1 email;internet:Martin.Knoblauch@TeraPort.de title:Senior System Engineer x-mozilla-cpt:;32160 fn:Martin Knoblauch end:vcard
--------------071890BD94909C5D37DA8DDE--
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/