- Home
- Memory Analyzer
- How to use Memory Analyzer with eclipse
Follow below steps to use MAT in eclipse
1. create sample project with simple program. If you observe the program that have three threads with sleep to get process slow because to monitor MAT we required process ID.
If program is small will not get process ID, because process of program will not take much time so will not get process ID.
2. Execute the program, Next our job to monitor the process Id for program in MAT.
3. Open Perspective->Others->Select Memory Analyzer.
4. Go to Acquire Heap Dump in file
5. Options->Leak Suspect Report
6. See the Description as a class name, because present program is running.
Select the row, will create file extension with .hprof, file name along with processed.
7. Select the Home directory for Java.
8. Select the histogram option
9. Next step Select Group Results by, In that Select Group by Package
10. See the results of the page. Observe Shallow Heap and Retain Heap for our program