简体   繁体   English

如何分析Java 1.3中的内存泄漏

[英]How to analyze a memory leak in Java 1.3

I have a WebLogic 7 server, running under j2sdk1_3 on a Solaris platform. 我有一个WebLogic 7服务器,在Solaris平台上的j2sdk1_3下运行。 Since Java5, I know the jmap command is very usefull for analyzing and troubleshooting a memory leak. 从Java5开始,我知道jmap命令对于分析和排除内存泄漏非常有用。

Is there a similar tool that can be used on Java 1.3? 是否有类似的工具可以在Java 1.3上使用?

The -Xrunhprof option is available on the 1.3 JVM executable . -Xrunhprof选项在1.3 JVM可执行文件中可用。 This will generate a heap dump, in either ASCII or binary format, when the JVM exits (whether or not due to out-of-memory). 当JVM退出时(无论是否由于内存不足),这将以ASCII或二进制格式生成堆转储。 If you have a modern development machine, I believe you can use jhat to read the binary format. 如果您有一台现代开发机器,我相信您可以使用jhat来读取二进制格式。 As noted in the docs, java -Xrunhprof:help will tell you what the options are. 如文档中所述, java -Xrunhprof:help将告诉您选项是什么。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM