Wednesday, March 21, 2007

Strange Out-of-memory errors

In the last couple of days (ever since I installed mylar -- which is a great plugin for managing tasks and related contexts -- but currently only integrates with the navigator in pydev), eclipse has been hard-crashing... and the error log said: java.lang.OutOfMemoryError: PermGen space (this is in jdk 1.5... in jdk 1.4 it would not say 'PermGen space', and would just say 'OutOfMemoryError'), so, after searching for it, it appears that there is some memory that the jvm uses just to store class definitions and other things that are permanent in the application, so, raising the usual -Xmx256m flag does not cover for it... you need to set: "-XX:MaxPermSize=128m" to raise that memory (the default is 64 mb).

This is probably only an issue for people that use many plugins (like I do), and therefore have many classes loaded in the jvm... so, it's nice to keep an eye open about it ;-)

1 comment: