Java GC: why two survivor regions?

前端 未结 7 1496
旧巷少年郎
旧巷少年郎 2020-12-04 06:15

For Sun/Oracle\'s JVM, I\'ve read that the GC algo divides new generation into one Eden region and two survivor regions. What I\'m wondering about is, why two survivor regio

7条回答
  •  甜味超标
    2020-12-04 06:26

    What are the advantages and disadvantages of copying all instances of a generation from one space to another, versus copying them in memory-address order to the start of a generation's space? Processing items in order would probably require adding an extra pointer per item, but would eliminate the need for one of the 'survivor' spaces.

提交回复
热议问题