#执行前先执行下sync命令 #To free pagecache:
echo 1 > /proc/sys/vm/drop_caches
#To free dentries and inodes:
echo 2 > /proc/sys/vm/drop_caches
#To free pagecache, dentries and inodes:
echo 3 > /proc/sys/vm/drop_caches
linux系统内存主要用于3个地方:1 进程 ,2 slab,3 pagetab。
系统free 命令查看到是系统整体的内存使用情况,ps 和top 都是根据进程来显示的所以,并不会显示像slab和pagetab这些占用的内存信息。