mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mike Fedyk <mfedyk@matchmail.com>
To: Paolo Ornati <ornati@lycos.it>
Cc: J?rgen Urban <jur@sysgo.com>, linux-kernel@vger.kernel.org
Subject: Re: Lost memory, total memory size is not correct
Date: Mon, 19 Jan 2004 14:22:29 -0800	[thread overview]
Message-ID: <20040119222229.GU1748@srv-lnx2600.matchmail.com> (raw)
In-Reply-To: <200401191845.58901.ornati@lycos.it>

On Mon, Jan 19, 2004 at 06:58:05PM +0100, Paolo Ornati wrote:
> On Monday 19 January 2004 12:22, J?rgen Urban wrote:
> > Hello,
> >
> > I tried to get the amount of total physical memory. I looked at
> > /proc/meminfo and found this line (2.4.18):
> >
> > MemTotal:        30844 kB
> >
> > But this is not correct the system have 32768 kB Memory. I looked at
> > kernel sources and I found the variable max_mapnr. Can I use it to detect
> > the correct memory size? It seems that it stores the maximum number of
> > pages usable. So I can convert it with macro K() in
> > linux/fs/proc/proc_misc.c to a value in kB.
> 
> There are some addresses that cannot be used on PC because there is 
> something mapped (for example System ROM...), you can see these regions 
> doing "cat /proc/iomem".

That's usually just a few KB, but don't forget that MemTotal is what's left
after kernel memory is mapped.

      reply	other threads:[~2004-01-19 22:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-19 11:22 Jürgen Urban
2004-01-19 17:58 ` Paolo Ornati
2004-01-19 22:22   ` Mike Fedyk [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040119222229.GU1748@srv-lnx2600.matchmail.com \
    --to=mfedyk@matchmail.com \
    --cc=jur@sysgo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ornati@lycos.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®