lkml.org 
[lkml]   [2001]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: Size of /proc/kcore growing over time ?
    "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
    \
     
     \ /
      Last update: 2005-03-22 12:52    [W:0.047 / U:127.704 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site