Hello Esteban,
MAT works with heap dumps, so the first
thing you’ll need is to get a heap dump. Looking at your example, it will
be easy to let the VM write one when an OutOfMemoryError occurs. See “Getting
a heap dump” [1] for more details.
Then switch to the “Memory analysis”
perspective and open the generated heap dump file.
Running the leak suspect report [2] could
be a starting point in the analysis.
In your case the tool should point to the
main thread and a huge Object[]. If you use a 1.6 JDK you would also be able to
see the stacktrace.
Additional info you can find in the Memory
Analyzer help pages. Just go in your Eclipse to “Help” -> “Help
Contents” and find Memory Analyzer there.
If you need some further help, let us
know.
Regards,
Krum
[1] http://wiki.eclipse.org/index.php/MemoryAnalyzer#Getting_a_Heap_Dump
[2] http://memoryanalyzer.blogspot.com/2008/05/automated-heap-dump-analysis-finding.html
Krum Tsvetkov
SAP AG
www.sap.com
http://www.sap.com/company/legal/impressum.epx
From:
mat-dev-bounces@xxxxxxxxxxx [mailto:mat-dev-bounces@xxxxxxxxxxx] On Behalf Of Esteban Alvarez
Sent: Sonntag, 10. April 2011
21:12
To: mat-dev@xxxxxxxxxxx
Subject: [mat-dev] Eclipse
Importance: High
Hello,
This weekend I have started to use the tool of Memory
Analyzer in Eclipse Classic 3.6.2, but I am having many problems with the
execute.
1º)
For start I have installed the tool of Memory Analyzer (Help -> Install new
software...).
2º)
Then I created a new Java Project.
3º)
In the new Java Project, I have created a Class with this code:
import java.util.ArrayList;
public class MemoryAnalicer {
private static
List<Integer> memoryLeakArea=new ArrayList<Integer>();
public static void
main(String [] args){
Integer
increaseNumber=new Integer(iteration);
memoryLeakArea.add(increaseNumber);
System.out.println(iteration);
4º) With this code I want detect the memory leaks that it
generate with the execute, I know that with the Memory Analyzer it's possible
For this reason, I would like it to ask you if you can
hep me with the problems that I have with Memory Analyzer.
Thanks
so much for the answer,