问题标签 [eclipse-memory-analyzer]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
android - Java MAT histogram class with "Unknown" tag
What does the Unknown -tag mean when you open (Android) heap dump with MAT, go to histogram, the then select e.g. "merge shortest paths..." for your class of interest?
Like here:
There can be also other tags like Thread or System class with the Unknown.
I ask this as someone claimed that the Unknowns are subject to GC and could thus be ignored in memory leak analysis. I failed to find a reliable source for this. Can someone verify this?
android - 内存分析器工具 - Android
我修复了我的应用程序活动中的窗口泄漏。但是,当我在 android - Histogram View 中使用 Memory Analyzer Tool 测试应用程序时,我发现了 2 个我的活动实例。
班级名称 | 对象 | 浅堆 | 保留堆
. MATDemoActivity。 | | |
com.pace.mat.MATDemoActivity | 2 | 368 |
总计:1 个条目(已过滤 2,195 个)| | |
既然没有内存泄漏,怎么可能是 2 个对象呢?请帮助我理解 MAT 结果中的数据....提前致谢
请在此链接中找到完整的代码和相关讨论。
==================
我发现当我从 Activity 1st -> 2nd -> 1st 开始时。第一个活动类的浅堆 = 2 和第二个活动类 = 1 当我从第一个 -> 2nd -> 1st -> 2nd 移动时……第一个活动类的浅堆 = 1 和第二个活动类 = 2。
所以我尝试了启动模式。我为所有活动设置了 android:launchMode="singleTask"。现在这两个活动的浅堆等于我导航到页面的次数。但是由于在此启动模式下不允许多个实例,为什么我没有将浅堆对象计数为 1 ?
请分享您的想法,这将有助于我更好地理解这一点。
android - 在eclipse中使用MAT并解决内存泄漏
我正在使用 Eclipse 的 MAT 来分析我的 Android 项目中的内存使用情况。
我用过
在我的 onCreate().. 并生成 myapp.hprof 文件。然后使用“hprof-conv myapp.hprof mat.hprof”将其转换为 mat.hprof
我使用 eclipse 打开了“mat.hprof”,它显示了巨大的泄漏。
我不知道如何分析和解决这些泄漏。
例如:
我无法使用 MAT 打开与其相关的源文件。
请帮忙。
谢谢斯内哈
_
android - 活动中的Android内存泄漏
我正在使用 MAT 工具测试我的应用程序,发现存在内存泄漏,但我无法在代码中找到它。请帮助我。
//第一个活动
//第二个活动
我正在创建一个新线程并开始一项活动。这会创建活动类的新实例吗?
java - 更改 Eclipse 运行时环境
必须有 Java 运行时环境 (JRE) 或 Java 开发工具包 (JDK) 才能运行 MemoryAnalyzer。搜索以下位置后没有找到 Java 虚拟机:C:\Documents and Settings......
我的问题是如何更改 JRE 或 JDK 的路径?
注意我的eclipse工作得很好。
android - Eclipse 内存分析器 - 帮助查找泄漏
我正在尝试在我的 Android 应用程序中查找内存泄漏。我有以下情况:
A 类创建了一个 A$24 类,它创建了一个线程。这个线程有一个类 A 的引用,所以这就是泄漏。我知道 A$24 是在 A 类中创建的匿名类,但我怎样才能找出在哪里创建,在代码中的哪一行。我的问题是了解谁是有问题的线程。
eclipse - How can I use Eclipse Memory Analyzer Tool to dump the heap from a running process?
I created a simple console application that I run from Eclipse (right clicking on the file and selecting run as Java application.) I stuck a sleep in there so I can ensure that the process is still running when I start the Aquire Heap Dump Dialog. I start the dialog, hit refresh, and there are no local processes listed.
I checked Eclipse's error log and it only reports that it had problems listing the IBM VM processes (the HPROF one is configured and working fine.)
What am I doing wrong?
android - 从谷歌地图获取静态地图 - 我有内存泄漏吗?
这是我的第一个 Android 应用程序,它运行良好,但我已经开始在我的 LogCat 中获取 GC_CONCURRENT 消息。我读过这是垃圾收集器,它似乎每次在 log cat 中报告时都会释放大约 %6-%7 (似乎是 4-5 次)。现在我不确定这是否意味着我有泄漏?
我安装了 MAT 插件,这就是它向我展示的内容:
似乎表明我正在使用与位图相关的东西占用超过 %60 的内存?
这是我获取位图的代码:
现在它给了我一个警告,处理程序应该是静态的,以防止潜在的内存泄漏,但我不确定这是否对我有影响?或者从服务器加载地图后如何更新我的 UI。
android - 如何从内存转储中找出预加载的系统可绘制对象(位图)的 ID 或名称
我正在分析我们应用程序的内存使用情况,发现奇怪Drawables
,它不断“吃掉”几兆字节的堆。以下是MAT的几张截图:
具有 2 个非常大的位图的支配树
上述位图之一的 GC 根路径
无论我使用我们的应用程序多长时间或多密集,此位图总是出现在我的手机(Samsung Galaxy Nexus,OS 4.1.1 )的堆转储中。
我已经尝试使用 MAT 搜索此位图的来源 - 没有运气。我能找到的所有有用信息都是width
位height
图,都是 512x512:
但是我们的应用程序没有任何单一的 512x512 可绘制对象。我认为这是一些“系统”可绘制对象。但究竟是什么?为什么它们这么大?
我还查看了android.content.res.Resources
类的源代码,搜索字段的用法sPreloadedDrawables
- 也没有运气。我从内存转储中得到的只是key
来自sPreloadedDrawables
数组,但我无法从这个键中确定文件名或资源 ID。
所以,我的问题是:
如何确定此位图的名称或 ID?
加载这个巨大的位图是什么,为什么它们总是留在内存中?
更新:
我找到了一种从内存转储中查看此位图的方法。这两个位图是一个简单的渐变,一个是黑色,另一个是白色。我想这是ICS 主题Holo.Light
的资源。Holo.Dark
但是我的第二个问题仍然是实际的:为什么这个位图总是留在内存中?有没有办法上传或回收它们?
android - MAT (Eclipse Memory Analyzer) - how to view bitmaps from memory dump
I'm analyzing memory usage of my Android app with help of Eclipse Memory Analyzer (also known as MAT). Sometimes I can find strange instances of android.graphics.Bitmap
class, utilizing big portion of heap. Problem is what I can't find source of this bitmaps, no filename, no resourceID, nothing. All information what I can find for bitmap is following:
There is a field mBuffer
with array of image pixels, I assume. But it's in some internal Android format, not PNG.
Question: how can I view image represented by this bitmap from memory dump?