Calculating of total free memory

Chuck Swiger cswiger at mac.com
Fri Mar 3 05:51:25 PST 2006


N. Ersen SISECI wrote:
> 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)  )

Um, no-- what you've calculated is the amount of memory that's being used.

Free in top is the amount of memory that is completely unused and is "free";
(Free + Inactive) is the amount of memory that could become available to a
program that needed it, but even that is an oversimplification.

-- 
-Chuck


More information about the freebsd-questions mailing list