HOME > System software > Eclipse: Using Memory Analyzer - How To Save Space

Eclipse: Using Memory Analyzer - how to save space

With Eclipse you create various Java programs. For this, the development environment offers you numerous functions that make programming easier. Since Java programs in particular can quickly become memory-intensive, it is worth using Eclipse's Memory Analyzer, which shows you various weak points.

How to use the Memory Analyzer in Eclipse

You can use the Memory Analyzer (MAT) to detect memory leaks in your Java program. Before this is possible, however, you need to install the feature.
  1. Go to "Help" and then to "Eclipse Marketplace".
  2. Enter "MAT" in the text field for the search.
  3. Then click "Install" on the corresponding entry.
  4. Open the Java project that you want to evaluate.
  5. Now create a subfolder within your project with "New" > "Folder", in which the MAT files are stored.
  6. Go to "Run". For this, press the small arrow next to the icon.
  7. Then click on "Java Applications" > "Start" > "Arguments" under "Run Configurations".
  8. Here is the field "VM Arguments". Under VM Arguments now add the parameters "-XX:+HeapDumpOnOutOfMemoryError" and "-Xmx(MEMORY)m".
  9. In place of (MEMORY) write how many Mbytes your program may consume maximum.
  10. If you want to evaluate the examination afterwards, go to "Window" > "Perspective" > "Open Perspective" > "Other" > "Memory Analysis".
  11. Under "Open Heap Dump" you can now open the corresponding "Heap Dump File" with all the information.

By Amber Ogans

Google Chrome: How to install add-ons in the browser :: Subwoofer: Calculate housing - improve sound
USEFUL LINKS