进行“内存转储”的Java应用程序? [英] Making a "memory dump" of java application?

查看:114
本文介绍了进行“内存转储”的Java应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有Java应用程序,不幸的是,它在一段时间后开始消耗大量内存。更复杂的是,它不仅是Java应用程序,它也是JavaFX 2应用程序。

I have Java application, which, unfortunately, begins to consume quite big amounts of memory after some time. To complicate things, it's not only Java application, it is also JavaFX 2 application.

我怀疑存在一些内存泄漏,甚至可能在底层JavaFX调用和本机库中。

I suspect that there is some memory leak, maybe even in underlying JavaFX calls and native libs.

理想的解决方案是在某个时刻(使用内存使用情况)获取所有java对象的转储,然后分析该转储。有没有办法实现这个?

The ideal solution would be to get a dump of all java objects at some moment (with their memory usage), and then analyze that dump. Is there some way to achieve this?

推荐答案

有许多方法可以获得堆转储,从jmap这样的简单工具开始更多花哨的东西,如JVisualVM,甚至是商业工具,如JProfiler。正确解释这些转储可能会很棘手,因此您可能希望准确发布您要查找的内容。正在寻找内存泄漏,或者您是否有兴趣了解您的应用程序?

There are lots of ways to get a heap dump, starting with simple tools like jmap to more fancy stuff like JVisualVM or even commerical tools as JProfiler. Correctly interpreting those dumps can be tricky though, so you might want to post exactly what you are looking for. Are going hunting for a memory leak, or are you interested in getting a general feel for your application?

这篇关于进行“内存转储”的Java应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆