当前位置:网站首页>cms 和 g1的主要區別
cms 和 g1的主要區別
2022-06-09 06:23:00 【lixia0417mul2】
cms和g1的主要區別
1.cms是內存分布式分代連續的,也就是新生代一塊連續的區間,年老代一塊連續的區間,而g1是把堆分成了2048個region,每個區域region可以作為新生代也可以作為年老代,並且新生代的大小(也即region的個數)是根據期望的暫停時間動態調整的.
2.cms中大對象是直接分配到年老代的,而且ygc是沒法回收年老代中的大對象的,必須要通過cms gc才能回收,而g1中大對象是直接分配到Humongous大對象區域的(不過該區域一般認為是年老代),這裏g1比較好的一點是ygc的時候就可以回收掉沒有引用的大對象了,而不用等到mixed gc再回收
3.cms的主要步驟有:初始標識(stw),並發標識,重新標識(stw),並發清理(cms的清理階段是和應用線程並發進行的,使用的是標記清除算法,會產生大量的內存碎片); g1的mixed gc中的全局並發標識階段的主要步驟有:初始標識(stw),並發標識,重新標識(stw),初始清理(stw),並發清理, 混合gc中的初始清理+並發清理作用只是回收完全沒有引用的region,然後計算要回收的region中垃圾的占比,排好序後為後面混合gc的時候加入CSet回收集中做好准備,比如為後面的8次gc回收做好計劃,如每次回收把哪些region加入到cset集合中,真正的回收操作是緊跟著的mixed gc的evacuation階段,在evacuation階段中會分8次回收全局並發標識階段標記的Region,使用的是標記整理的算法,不會產生內存碎片.
4.g1比cms會使用更多的內存和cpu負載,所以更適合用於大堆的應用
边栏推荐
- ImportError: cannot import name ‘joblib‘ from ‘sklearn.externals‘
- Analysis and Discussion on security level of 6-bit password lock
- Bladed software windfile calculation
- Openresty newly added module
- 全志V3s学习记录(11)音频、视频使用总结
- C List sort
- Exponential moving weighted average
- 指数移动加权平均
- C string usage set
- Example of flow chart, sequence diagram and Gantt chart of typera
猜你喜欢

Modularity in typescrtipt

全志H3停产,A40I/T3更胜一筹--CoM-X40I核心模块来了

error: subprocess-exited-with-error(fasttext)

Selection of industrial am335x core modules

Sqlserver imports and exports data. There is a process in the background and no display in the foreground.

Shopify theme style development

Solution d'instructeur de robot basée sur l'enregistrement complet a40i fabriqué en Chine

Conversion of data type real and word in PROFIBUS DP communication

Codeblocks项目窗口管理

全志平台BSP裁剪(6)附件三--rootfs menuconfig配置说明
随机推荐
全志T3(A40I)/T5(T507)性能对比,一代更比一代强
C List sort
Solution of robot teaching pendant based on domestic Quanzhi a40i
C event
RNN and its improved version (with 2 code cases attached)
Conversion of data type real and word in PROFIBUS DP communication
全志平台BSP裁剪(2)附件一 General setup配置说明
Office software batch startup procedure
SQLServer 导入导出数据,后台有进程,前台无显示。
全志V3s学习记录(9)buildroot文件系统构建
Itop-2k1000 development board startup ramdisk production startup USB flash disk
Powerdns 1- introduction and installation
Coredns Part 1 Introduction and installation
zgc gc消息类型及触发时机
卷积神经网络概述以及简单案列
adam 神经网络
ImportError: cannot import name ‘joblib‘ from ‘sklearn. externals‘
全志平台BSP裁剪(4)kernel裁剪--File systems & driver & 杂项裁剪
Yocto compiling libdrm
全志V3s学习记录(12)RTL8723BS的使用