SUN的JVM1.3.1使用分代垃圾收集算法。
SUN's JVM 1.3.1 USES a generational garbage collection algorithm.
垃圾收集发生在每一代填充满的时候;对象是在Eden中分配的,因为早期损坏率的缘故,大部分对象“死”在这个时期。
Garbage collection occurs in each generation when it fills up; objects are allocated in Eden, and because of infant mortality most objects "die" there.
在垃圾收集时,就对与老一代中卡片相关联的标记位进行检查,对脏的卡片扫描以寻找对年轻代有引用的对象。
At garbage collection time, the mark bits associated with CARDS in the old generation are examined, and dirty CARDS are scanned for objects containing references into the younger generation.
分代收集的一个优点是它不同时收集所有的代,因此可以使垃圾收集暂停更短。
One of the advantages of generational collection is that it can make garbage collection pauses shorter by not collecting all generations at once.
完整的垃圾收集涉及JVM对堆上所有的对象进行检验,包括经历了许多代、在部分垃圾收集上不会被分析的对象。
A full garbage collection involves the JVM examining all objects on the heap, including those that have survived many generations, that would not be analyzed on partial garbage collections.
当需要对较老的一代进行垃圾收集时,会有一次较大的收集,因为涉及到所有存活对象,所以这次收集通常比较慢。
When older generations need to be collected, there is a major collection that is often much slower because it involves all living objects.
在年轻的代中创建对象,满足某些提升标准的对象,如经历了特定次数垃圾收集的对象,将被提升到下一更老的代。
Objects are created in the young generation, and objects that meet some promotion criteria, such as having survived a certain number of collections, are then promoted to the next older generation.
分代收集器对不同的代可以自由使用不同的收集策略,对各代分别进行垃圾收集。
A generational collector is free to use a different collection strategy for different generations and perform garbage collection on the generations separately.
JD K 1.2及以后版本所使用的分代垃圾收集器提供了比早期JDK所使用的标记-清除-整理收集器好得多的分配和收集性能。
The generational collector employed by JDK 1.2 and later offers far better allocation and collection performance than the mark-sweep-compact collector used by earlier JDKs.
InfoQ:看起来这个补丁将会是迈向新一代垃圾收集器的第一步,尤其是关于处理写屏障和可记忆化集合的代码介绍。
InfoQ: it seems like the longlife GC patch is the first step towards a generational GC, particularly the introduction of code for handling write barriers and remembered sets.
当eden填充满时,会发生较小的垃圾收集,在这期间,存活下来的一些对象被转移到较老的一代。
When Eden fills up, it causes a minor collection, in which some surviving objects are moved to an older generation.
为什么代的概念可以提高垃圾收集器的性能?
Why generation concept can help improve performance of garbage collector?
您还可以收集对象生存期数据,这些数据显示每代垃圾回收中所回收的对象的大小和数目。
You can also collect object lifetime data that shows you the size and number of objects that are reclaimed in each garbage collection generation.
那些与后台垃圾收集同时进行的短垃圾收集(第0代和第1代收集)被称为前台垃圾收集。
The ephemeral GCs (gen 0 and gen 1 GC) done while a background GC is in progress are called foreground GCs.
代概念的引入是为了提高垃圾收集器的整体性能。
The importing of generation concept is to improve the performance of garbage collector.
程序刚开始运行,垃圾收集器分配为每一代分配了一定的内存,这些内存的初始大小由。netframework的策略决定。
When the program initializes, garbage collector allocates memory for generations. The initial size of memory blocks are determined according to the strategies of the. Net framework.
程序刚开始运行,垃圾收集器分配为每一代分配了一定的内存,这些内存的初始大小由。netframework的策略决定。
When the program initializes, garbage collector allocates memory for generations. The initial size of memory blocks are determined according to the strategies of the. Net framework.
应用推荐