[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: memory usage problem




> This shouldn't be a problem; Soot usually consumes 32m+ on our machines.
> 
> How are you invoking Soot? just java ca.mcgill.sable.soot.Main?

I use the SootClassManager to load the class file, then jimple it. This
is the way I use the soot before I construct my IPDG on the jimple
code of java program. 

	.....
        SootClassManager cm = new SootClassManager();

	chg = new ClassHierarchyGraph(classFilename, cm);
	

	// Step 1, constructs the ProgramDependenceGraph for each method
	// defined in each class, and put them into the HashMap,associates
	// each of them with a signature.
	List classes = chg.classes();
	Iterator classesIt = classes.iterator();
	while(classesIt.hasNext()) {
	    SootClass sc = (SootClass) classesIt.next();

	    Iterator methodIt = sc.getMethods().iterator();
	    while(methodIt.hasNext()) {
		SootMethod m = (SootMethod) methodIt.next();

		JimpleBody jbody = (JimpleBody) new
                                    BuildAndStoreBody(Jimple.v(), new
StoredBody(ClassFile.v())).resolveFor(m);

		StmtList stmtList = jbody.getStmtList();
		//CompleteStmtGraph graph = new CompleteStmtGraph(stmtList);
		String psig = sc.getName()+m.getSignature();

		ProgramDependenceGraph pdg = new 
		    ProgramDependenceGraph(stmtList, psig, ifEfficient);
		.....
		}

> Try java -ms128m -mx128m ca.mcgill.sable.soot.Main
	Is this something related to memory usage? I'll check
> 
> What version of the jdk are you using?
	I am using JDK1.1.3. 
> 

I also think it should be ok with memory. But don't know why I cannot
use the memory available? 

Thanks very much,

Liang