在linux的内存分配机制中,优先使用物理内存,当物理内存还有空闲时(还够用),不会释放其占用内存,就算占用内存的程序已经被关闭了,该程序所占用的内存用来做缓存使用,对于开启过的程序、或是读取刚存取过得数据会比较快。有关Linux内存机制参考:
Linux 内存机制
http://blog.csdn.net/tianlesoftware/archive/2010/04/08/5463790.aspx
二. buffer 与cache 的区别
A buffer is something that has yet to be "written" to disk.
A cache is something that has been "read" from the disk and stored for later use.