Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Java in General and the fly likes Using Eclipse Memory Analyzer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Using Eclipse Memory Analyzer" Watch "Using Eclipse Memory Analyzer" New topic

Using Eclipse Memory Analyzer

John Vorwald
Ranch Hand

Joined: Sep 26, 2010
Posts: 139
A heap dump was generated after a out of memory error. The eclipse memory analyzer leak suspect report indicates three suspect leaks. How do I read this report? I see a shortest paths to accumulation point, that refers to a jpanel object, and doesn't seem too helpful. The accumulated object indicates the largest object is a "view" class, and the next largest object is a jfree chart panel. The accumulated object by class list the jfree chart, followed by a "solver" class, followed by jfree time history. This could suggest that the "solver" class is providing too much data to the "view" class.

I'm not sure what I would do next here. Is there a way to identify the variable that is too large?
John Vorwald
Ranch Hand

Joined: Sep 26, 2010
Posts: 139
Boy, that took some effort to find the cause of the out of memory error.
I accidentally introduced a out of memory error into the program.
I tried using the memory analyzer, but could not understand the information well enough to isolate the error.
I ended up using JConsole with break points in eclipse to monitor when the memory. I was able to hit pause while the memory was increasing, and by looking at the stack dump saw there was an infinite recursion loop. The loop was a result of multiple toString members.

From this exercise, one approach to resolve an out of memory error is to use JConsole to monitor the memory while using break points to evaluate different sections of the program.
I agree. Here's the link:
subject: Using Eclipse Memory Analyzer
It's not a secret anymore!