[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
java.lang.OutOfMemoryError
Hi!
Could it be that invoking CHA (with preparation for VTA, means all
ContextClasses set to LibraryClasses) uses more than 100MB RAM on a
simple Hello World program? Just because I tried that today and first it
took several minutes and after that the thread died with a
java.lang.OutOfMemoryError... When I started the program, the task
manager told me I had around 170MB physical RAM available. At the point
I start CHA (after laoding the classes) there were still 140MB
available.
Thanks,
Eric
P.S. Here my test code:
public static void main(String argv[]) throws Exception{
System.out.println(new java.util.Date() + " setting
classpath");
soot.Scene.v().setSootClassPath("D:\\Apps\\Coding\\Java\\J2SDK\\sdk1.4.1
_01\\jre\\lib\\rt.jar;.");
System.out.println(new java.util.Date() + " loading test
class");
soot.Scene.v().loadClassAndSupport( "Hello"
).setApplicationClass();
System.out.println(new java.util.Date() + " changing to
libary classes");
java.util.Iterator contextClassesIt =
Scene.v().getContextClasses().snapshotIterator();
while (contextClassesIt.hasNext())
((SootClass)contextClassesIt.next()).setLibraryClass();
System.out.println(new java.util.Date() + " starting CHA");
InvokeGraph graph =
ClassHierarchyAnalysis.newInvokeGraph();
System.out.println(new java.util.Date() + " starting VTA");
VariableTypeAnalysis VTA = new VariableTypeAnalysis(
graph );
System.out.println(new java.util.Date() + " trimming
Graph");
VTA.trimActiveInvokeGraph();
}
------------------------------------------------------------
Eric Bodden
University of Kent at Canterbury