知识库--Garbage Collection Types(71)

When the young generation fills up, a young generation of just that generation is performed. When the old or permanent generation fills up, what is known as a full collection is typically done. That is, all generations are collected. Commonly, the young generation is collected first, using the collection algorithm designed specifically for that generation, because it is usually the most efficient algorithm for identifying garbage in the young generation. Then what is referred to below as the old generation collection algorithm for a given collector is run on both the old and permanent generation. If compaction occurs, each generation is compacted separately.

Sometimes the old generation is too full to accept all the objects that would be likely to be promoted from the young generation to the old generation if the young generation was collected first. In that case, for all but the CMS collector, the young generation collection algorithm is not run. Instead, the old generation collection algorithm is used on the entire heap.

The CMS old generation algorithm is a special case because it cannot collect the young generation.
//full GC 一般收集算法会对整个堆进行old generation collection algorithm, 但是CMS的old generation algorithm 不能对年轻代使用,因为不能收集年轻代空间

阅读更多
文章标签: gc
个人分类: gc
想对作者说点什么? 我来说一句

The Garbage Collection Handbook.pdf

2015年05月19日 53.84MB 下载

The Garbage Collection Handbook epub 0分

2016年10月19日 4.23MB 下载

没有更多推荐了,返回首页

不良信息举报

知识库--Garbage Collection Types(71)

最多只允许输入30个字

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭