Java堆内存溢出调试工具

可以通过以下选项设置当虚拟机发生内存溢出异常的时候生成堆栈转储信息:

-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp/mydump.hprof

 

分析转储信息的方式:

安装Eclipse内存分析器(eclipse memory analyzer

使用大内存设置启动Eclipse:eclipse -vmargs -Xmx6G

打开Eclipse内存分析选项页: Window > Open Perspective > Other > Memory Analysis

猜你喜欢

转载自clearity.iteye.com/blog/2056361