[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    Bug#9688: Memory information error
From:       Helge Deller <deller () gmx ! de>
Date:       2001-01-31 21:11:02
[Download RAW message or body]

This is a general problem, which isn't easy to deal with.
kcminfo gets the same information from the system, which you can see in 
/proc/meminfo: 
On my 256MB box I get 
[deller@P100 deller]$ cat /proc/meminfo
        total:    used:    free:  shared: buffers:  cached:
Mem:  262279168 260624384  1654784        0 15380480 100044800
^^^^^^^^^^^^^^^^^
The first number calculates as:
262279168 Bytes / (1024*1024) = 250 MB (oops! -> I'm missing 6MB!)

Now you see:
1. It's hard to get the correct number from the kernel,
2. depending on which kernel you run you will get different sizes 
	(this depends on motherboard and implementation in kernel)
3. kcminfo needs to trust the kernel

I could try to workaround that problem (e.g. to round the number up or down 
to the next 16MB boundary), but then I would need to round the other sizes 
(shared/used memory) too - but: how ?

If you have any other idea how to handle this problem please let me know.

Greetings,
Helge Deller 

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic