* How do I calculate the free memory with kernel 2.4.19?
@ 2003-05-23 9:11 Knut.Beneke
0 siblings, 0 replies; only message in thread
From: Knut.Beneke @ 2003-05-23 9:11 UTC (permalink / raw)
To: linux-mm
Hi!
I am writing a program which needs to calculate the actual free memory to
determine if it can start a memory intensive evaluation.
Until now we used a linux system with 2.2.17 kernel, here you could
determine the free memory via /proc/meminfo:
real free memory = free + buffers + cached
Now we use a Mandrake 2.4.19 kernel and the values in /proc/meminfo look
strange: free and buffers seem to mean the same as with kernel 2.2.17, but
the cached value is much higher.
Example:
cat /proc/meminfo
total: used: free: shared: buffers: cached:
Mem: 262221824 204009472 58212352 0 9121792 156876800
Swap: 0 0 0
MemTotal: 256076 kB
MemFree: 56848 kB
MemShared: 0 kB
Buffers: 8908 kB
Cached: 153200 kB
SwapCached: 0 kB
Active: 16848 kB
Inactive: 167112 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 256076 kB
LowFree: 56848 kB
SwapTotal: 0 kB
SwapFree: 0 kB
The machine has 256MB physical memory, no swap. At the moment our
application is running, using about 150-200MB, some of it is shared memory
(at least 128MB).
The sum of free + buffers + cached = 218956kB is much to high!
so, ... How do I calculate the real free memory and what does the cached
value mean?
Any help is appreciated!
Knut Beneke
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-05-23 9:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-23 9:11 How do I calculate the free memory with kernel 2.4.19? Knut.Beneke
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox