View Single Post
Posts: 64 | Thanked: 42 times | Joined on Jun 2009
#18
Originally Posted by jonnyl View Post
I'm pretty sure it takes into account any caching. You know, how most modern operating systems more efficiently use RAM instead of it being left empty doing nothing.
What's usually cached is recently computed/produced data. For example, if you run the find command twice, the second time it often returns almost immediately, because the output (assuming no intermediate changes that would alter the result) is copied from the cache, rather than being generated as it was the first time.

However, this allocation is very low priority from the system's perspective and the memory is freed the moment it is needed.

Lastly, IIRC to find a good estimate of "free" (allocable) RAM, you take the value from the line of the command cat /proc/meminfo command containing "MemFree:" and add to it the values from lines containing "Buffers:" and "Cached:"