* Free memory, include "cached"?
@ 2008-10-06 15:40 Gregoire Banderet
0 siblings, 0 replies; only message in thread
From: Gregoire Banderet @ 2008-10-06 15:40 UTC (permalink / raw)
To: Linuxppc-embedded
Hello,
I have to report the amount of FreeMem on my embedded system. The rootfs
is in RAM. I use /proc/meminfo.
I started by doing : freemem = MemFree + Buffers + Cached
But I realized (tell me if I'm wrong) that my rootfs filesystems is
counted in "Cached".
Part of the memory in "Cached" can be allocated, so I should add it as
Free Memory, but part of it is my rootfs (i.e. really used).
How should I compute freemem ?
Note that with linux 2.4 (initrd and not initramfs) I did use the ioctl
BLKGETSIZE in order to subtract the amount of memory used by the rootfs.
But now with initramfs it's dynamic.
Thanks,
Greg
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-10-06 15:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-06 15:40 Free memory, include "cached"? Gregoire Banderet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox