"Eclipse Memory Analyzer is a good utility for analyzing memory allocations. It helps you find memory leaks in your application." Explain to me please how to use this utility. I can not figure it out.

  • Do you need for android or for java dextpno-server? - KoVadim
  • For android - Natasha

2 answers 2

Found 2 links that explain everything. https://stackoverflow.com/questions/3112671/android-memory-analysing-eclipse-memory-analyzer This shows that you need to run the debug application, open the DDMS in Eclipse. In the Devices tab, select the device and package of your device. Then click on the "Dump HPROF file" button in the Devices tab, so you will create a file with the necessary resolution. Then in Eclipse MAT open File-> Open Heap Dump, select your file. If it does not load, then the problem is most likely this: https://stackoverflow.com/questions/6219049/error-openning-hprof-file Here you need to enter the following command on the command line: hprof-conv android.hprof mat.hprof, where bycnhevty hprof-conv is in the folder AndrodiSDK / tools / hprof-conv. In general in the links everything is there. Next, open your file in MAT and analyze)

    I can tell from personal experience. I used this thing myself for a long time somehow. Profiled Android application.

    In the application code you need to call: http://developer.android.com/reference/android/os/Debug.html#dumpHprofData(java.lang.String)

    The method writes data in the hprov format, but a format that is not compressed by MAT. Write data to the specified file on the memory card.

    In order for MAT to understand the format, you need to convert the resulting file using a standard utility in the SDK: hprof-conv dump.hprof converted-dump.hprof

    After the converted file can already be opened using Eclipse MAT. See how much what method was performed, etc.

    Comprehensive reading here: http://android-developers.blogspot.ru/2011/03/memory-analysis-for-android.html