jython memory usage

Samuele Pedroni pedronis at bluewin.ch
Thu Sep 5 08:29:54 EDT 2002


Ok, I have discovered an undocumented fact and maybe relevant fact.

The JVM ignore the Xmx limit for classes, now classes are garbage collected
if not used, but if that not the case and new classes are continously loaded
the JVM will allocate memory up to exhaustion of total memory, instead of
stopping
at Xmx.

Now one can log class loading, you can edit jython.bat and
put -verbose:class in there:

"..java.exe" -verbose:class "-Dpython.home=..."

then running jython.bat <the-mem-overflowing-code>

you should get an initial burst of [Loaded <classname>]
and then normally nothing or a pattern of

[Loaded ...]
...
[Unloading class ...]

If you get an increasing sequence of [Loaded ...] without corresponding
[Unloading class ...] then we have reduced
the possible suspects.

regards.






More information about the Python-list mailing list