Check Kernel Memory Allocation

Dave Hylands dhylands at gmail.com
Thu Jun 2 18:47:34 EDT 2011


Hi Dev,

> I wanted to know how much kernel and userspace memory is available on the
> Linux system during run-time either by some C code or some procfile.
>
> Do you know how to do that?

You can look in /proc/meminfo
http://unixfoo.blogspot.com/2008/02/know-about-procmeminfo.html

The memory is shared between userspace and kernel space and the amount
of memory available changes dynamically as the system is running.

Be aware that Cached memory is quite dynamic, and the system will
throw away cache pages to make space if it needs to.

-- 
Dave Hylands
Shuswap, BC, Canada
http://www.davehylands.com



More information about the Kernelnewbies mailing list