Interpreting /proc/meminfo. How much free memory do I have?

Jeff Angielski jangiels at
Tue Mar 28 03:49:23 EST 2006

On Mon, 2006-03-27 at 09:38 +0000, antonio.dibacco wrote:
> I don't understand the meaning of "Inactive". They are not used but the 
> kernel cannot give this memory to a requesting process because we tipically 
> don't have a swap device on a linux embedded board. Where we can store the 
> Inactive page? Am I wrong?
> If I run a process that continuosly allocates memory and print out the total 
> allocated memory when it receives SIGINT or SIGTERM, I think I get the real 
> "free memory"! 

The "big picture" is that the kernel assumes that any physical memory
that is not used is being wasted.  The kernel tries to anticipate what
data you will need and loads it into memory before you actually require
it.  This way there is no time delay when you want to access it.  So the
numbers are reflecting what the system/kernel is currentl using.  

Even if you are on a system with no swap parition like your embedded
board, pages in memory that are read-only can still be swapped out since
they can always be read back in when needed.  Sections like a
processes .text fit this category.

If you are trying to look at a specific process, perhaps looking at
the /proc/<pid>/status might help you analyze your memory needs.

Jeff Angielski
The PTR Group

More information about the Linuxppc-embedded mailing list