VM 的Permanent generation space,实际上就是方法区,存储了下面两种类型的数据:
1.Class的节本信息
Package Name
Super class package name
Class or interface
Type modifiers
Super inferface package name
2.其它信息
The constant pool for the type
Field information
Method information
All class (static) variables declared
in the type, except constants
A reference to class ClassLoader
A reference to class Class
其中constant pool包含以下信息:
literal strings
注:如String s="abc",这样的字面值,是从pool中取的,如果取不到会在池中存储一份,如果另外有个变量String t=“abc”,它首先会在pool中拿,如果能拿到,则不会新创建一份,String.intern方法也一样,因此用intern方法要特别注意,容易导致perm space out of memory
final variable values
如final s = “”;
class names
method names
String.intern();
另外要注意,在默认情况下,perm space是可以被垃圾收集的(除了CMS垃圾收集器之外),不再使用的class将会被unload,用参数-Xnoclassgc可以设置让perm space不卸载不再使用的class。
一般GC算法也是会照顾permanent generation的,每次permanent generation满了要做扩展前都会触发一次FULL GC,除非设置了-Xnoclassgc。
另外如果使用CMS(ConcMarkSweep GC)算法的话,开了-XX:+UseConcMarkSweepGC标志,默认情况下就是不会扫描permanent generation的,需要同时打开下面两个标志位才能让CMS GC扫描permanent generation。
-XX:+CMSPermGenSweepingEnabled
-XX:+CMSClassUnloadingEnabled
只针对SUN的JVM有效。
分享到:
相关推荐
Edward Snowden - Permanent Record-Metropolitan Bo(1).pdf
IIS%2bWordPress利用UrlRewrite实现永久链接-Permanent-Links-的完美方案
API RP 11S9-2023 - Permanent Magnet Motor Safety.pdf
python库。 资源全名:django-permanent-helpers-0.0.4.tar.gz
8\配置管理控制台界面登录 (1)修改 tomcat/conf/tomcat-users.xml 在节点上增加如下配置: <role rolename="manager-gui"/> <user username="tomcat" password="123" roles="manager-gui"/> (2)修改 tomcat/...
2016_Synchronous Switching of Non-Line-Start Permanent Magnet Synchronous Machines From Inverter to Grid Drives 王教授的论文 2016_Synchronous Switching of Non-Line-Start Permanent Magnet Synchronous...
for hrush less permanent-niaghei motors ever It is dcnigncd to sent the modern computer based generation of mo;or engineers, '['he book. uoe» hand-in-hand with modern software-based tedwiquer- for ...
为何从Java8开始,Permanent区域被取消变成了Metaspace区域 该文介绍了HotSpotVM的Permanent(永久代)变化为Metaspace(元数据)的原因和影响,文章是日文的,近期可能会翻译成中文 2. 先有Class还是先有Object 源自...
内存管理内幕 dragonimp's blog coder.developer.[designer].ArchitecturE.manager.^_^... posts - 29, comments - 121, trackbacks - 27 My Links Home Contact Login News !!! Article ...
为何从Java8开始,Permanent区域被取消变成了Metaspace区域 该文介绍了HotSpotVM的Permanent(永久代)变化为Metaspace(元数据)的原因和影响,文章是日文的,近期可能会翻译成中文 2. 先有Class还是先有Object 源自...
Reluctance Torque Utility for Line-Starting Permanent Magnet Motors
Optimum Design of a Five-phase Permanent Magnet Synchronous Motor for Underwater Vehicles by use of Particle Swarm Optimization
文将对 Linux™ 程序员可以使用的内存管理技术进行概述,虽然关注的重点是 C 语言,但同样也适用于其他语言。文中将为您提供如何管理内存的细节,然后将进一步展示如何手工管理内存,如何使用引用计数或者内存池来半...
基于现场可编程门阵列永磁同步电机模型的硬件在环实时仿真测试技术
permanent-delete:delete .tree-view : Shift-Delete 从树视图中删除选定的条目,文件或目录 问题/建议 请上的问题或建议,或者更好, 执照 permanent-delete是在下:copyright: 2015 奥尔莫克莱默
Centos7离线安装Cockpit 依赖...firewall-cmd --zone=public --add-service=cockpit --permanent firewall-cmd --reload 5.打开浏览器进行访问测试,https://127.0.0.1:9090, 输入账号密码进行访问(centos7账号密码)
防火墙-cmd --zone = public --add-port = 8081 / tcp --permanent 防火墙-cmd --zone = public --add-port = 5001 / tcp --permanent 防火墙-cmd --zone = public --add-port = 8080 / tcp --permanent 防火墙...
firewall-cmd --zone=public --add-port=**/tcp --permanent firewall-cmd --reload systemctl restart sshd 备注:如果重启失败,则进行以下调整 查看SElinux管理的SSH端口,并调整为与上一致的端即可 semanage ...
A new rotor structure for line start permanent magnet synchronous moto
永久播种机 www发展按照以下步骤启动并运行您的第一个 Nextein 站点: 克隆这个仓库运行npm install 运行npm run dev 在浏览器中打开 。导出静态版本运行npm run export部署到 Vercel Nextein elems Starter 包含一...