作者: Perry Cheng , Robert Harper , Peter Lee
关键词:
摘要: This paper presents two techniques for improving garbage collection performance: generational stack and profile-driven pretenuring. The first is applicable to stack-based implementations of functional languages while the second useful any collector. We have implemented both in a collector used by TIL compiler (Tarditi, Morrisett, Cheng, Stone, Harper, Lee 1996), observed decreases times as much 70% 30%, respectively.Functional encourage use recursion which can lead long chain activation records. When occurs, these records must be scanned roots. show that scanning many take so become dominant cost collection. However, most deep stacks unwind very infrequently, root information obtained from remains unchanged across successive collections. Generational greatly reduces scan reusing previous scans.Generational been successful reducing (Ungar 1984). Various complex heap arrangements tenuring policies proposed increase effectiveness frequency copying. In contrast, we using profile make lifetime predictions, pretenuring avoid copying data altogether. essence, this technique uses refinement hypothesis (most die young) with locality principle concerning age data: allocations sites produce immediately dies, few allocation consistently survives