Calculating of total free memory

Lowell Gilbert freebsd-questions-local at be-well.ilk.org
Fri Mar 3 05:35:16 PST 2006


"N. Ersen SISECI" <siseci at gmail.com> writes:

> I want to know REAL free memory size in my system. What I want to know 
> that is the real free memory size is hw.physmem - Free memory (the one 
> that is shown at the output of top -b). Various tools such as the one in
> freecolor ports in ports tree says it is not like that. It seems that
> Free Memory 
> is ( hw.physmem - (Free + Inactv)  )
> 
> I am not sure which one is the right one.. Can someone tell me which one
> is 
> the right one? 

I don't think you have a clear definition of "free memory" in mind.  
According to the kernel definitions, the "free" value from top(1) is
the amount of free RAM.  "Inactive" memory holds usable data, but can
be cleared for new uses fairly easily.

What is your purpose in looking for this number?  


More information about the freebsd-questions mailing list