Date: Wed, 19 Sep 2007 16:40:06 GMT From: Nick Johnson <freebsd@spatula.net> To: freebsd-java@FreeBSD.org Subject: Re: java/116461: java.lang.OutOfMemoryError: PermGen space Message-ID: <200709191640.l8JGe6Id048376@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR java/116461; it has been noted by GNATS. From: Nick Johnson <freebsd@spatula.net> To: bug-followup@FreeBSD.org, rafaelbascon@gmail.com Cc: Subject: Re: java/116461: java.lang.OutOfMemoryError: PermGen space Date: Wed, 19 Sep 2007 09:21:48 -0700 (PDT) The most obvious solution is to increase the amount of permanent generation space. java -XX:MaxPermSize=64m http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp http://java.sun.com/docs/hotspot/gc1.4.2/faq.html 7. How should the permanent generation be sized? The permanent generation is used to hold reflective of the VM itself such as class objects and method objects. These reflective objects are allocated directly into the permanent generation, and it is sized independently from the other generations. Generally, sizing of this generation can be ignored because the default size is adequate. However, programs that load many classes may need a larger permanent generation. 8. How can I tell if the permanent generation is filling up? Starting in 1.4.2 -XX:+PrintGCDetails will print information about all parts of the heap collected at each garbage collection. For a full collection [Full GC [Tenured: 30437K->33739K(280576K), 0.7050569 secs] 106231K->33739K(362112K), [Perm : 2919K->2919K(16384K)], 0.7052334 secs] this example shows that little was collected in the permanent generation (it went from 2919K used before the collection to 2919K used after the collection) and the current size of the permanent generation is 16384K. 9. How can I increase the permanent generation size? Use the command line option -XX:MaxPermSize=<desired size>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200709191640.l8JGe6Id048376>