让GC扫面持久区permanent generation

来源:互联网 发布:客户分布地图制作软件 编辑:程序博客网 时间:2024/05/17 08:18
一般GC算法也是会照顾permanent generation的,每次permanent generation满了要做扩展前都会触发一次FULL GC,除非设置了-Xnoclassgc。 

       另外如果使用CMS(ConcMarkSweep GC)算法的话,开了-XX:+UseConcMarkSweepGC标志,默认情况下就是不会扫描permanent generation的,需要同时打开下面两个标志位才能让CMS GC扫描permanent generation。 
-XX:+CMSPermGenSweepingEnabled 
-XX:+CMSClassUnloadingEnabled
0 0
原创粉丝点击