Java 7 fails to collect permanent generation which is collected by java 5

Viewed 597

Does anybody know why java 7 fails to collect permanent generation of app, resulting in java.lang.OutOfMemoryError: PermGen, while java 5 collects the permanent generation and app runs well?

App does evaluation of jython expressions in the loop, one iteration is approx. 5 sec. Body of the loop looks like:

PythonInterpreter py = new PythonInterpreter();
py.set("AI", 1);
((PyInteger)py.eval(expr)).getValue()

Screenshots of jvisual vm taken for app running in java 7 and java 5.

In both cases the same parameters are used:

-Xmx700m 
-XX:MaxPermSize=100m
-XX:+HeapDumpOnOutOfMemoryError
-Xloggc:"C:\Temp\gc.log" -XX:+PrintGCDetails  -XX:-TraceClassUnloading -XX:+PrintClassHistogram 

java 7 java 5

2 Answers
Related