什么是PermGen in Java?我们的团队对于PermGen空间的增长存在问题。这种增长最终会影响性能。
我想知道PermGen空间是什么,以及我们如何优化它的空间使用?
发布于 2010-01-19 09:25:20
来自http://java.sun.com/docs/hotspot/gc1.4.2/faq.html (问题7-10)
发布于 2010-01-19 09:24:32
在JVM中,PermGen保存已加载/创建的类。与堆的其他部分一样,这些信息是垃圾收集的,但是有一些粗糙的边缘可以防止这种情况发生。只需增加PermGen空间
Start your JVM with
-XX:MaxPermSize=Xm
where X is a number like 128, 256.关于这个错误的一个好的链接
发布于 2010-01-19 10:01:54
基本上,Perm生成是指堆上存储所有加载类的空间。它专门用于存储类定义。
除了Java类的基本字段之外,还有
* Methods of a class (including the bytecodes)
* Names of the classes (in the form of an object that points to a string also in the permanent generation)
* Constant pool information (data read from the class file, see chapter 4 of the JVM specification for all the details).
* Object arrays and type arrays associated with a class (e.g., an object array containing references to methods).
* Internal objects created by the JVM (java/lang/Object or java/lang/exception for instance)
* Information used for optimization by the compilers (JITs) 看见在这里。
https://stackoverflow.com/questions/2092347
复制相似问题