Linux释放内存

LINUX

 

1)查看
free -m

2)同步到硬盘
sync

3)释放页面
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

 

java垃圾回收:
 java -verbose:gc

 

查看进程占用内存情况
ps/top 查到PID
cat /proc/PID/status


你可能感兴趣的:(java,linux)