8.6.2 Free memory
top give good information on memory
resources. Do not worry about the size of "used" in the
"Mem:" line, but read the one under it (38792 in the example below).
$ free -k # for 256MB machine
total used free shared buffers cached
Mem: 257136 230456 26680 45736 116136 75528
-/+ buffers/cache: 38792 218344
Swap: 264996 0 264996
The exact amount of physical memory can be confirmed by grep '^Memory'
/var/log/dmesg, which in this case gives "Memory: 256984k/262144k
available (1652k kernel code, 412k reserved, 2944k data, 152k init)".
Total = 262144k = 256M (1k=1024, 1M=1024k)
Free to dmesg = 256984k = Total - kernel - reserved - data - init
Free to shell = 257136k = Total - kernel - reserved - data
About 5MB is not usable by the system because the kernel uses it.