The mark-sweep garbage collection algorithm constructs a list of memory areas to allocate into (the free list) during its sweep phase. This phase needs time proportional to the size of the heap which is collected. We introduce mark-split, a non-moving garbage collection algorithm that constructs the free list during the mark phase by maintaining and splitting free intervals. With mark-split, the sweep phase of mark-sweep becomes unnecessary and the cost of collection is proportional to the size of the live data set. Our performance evaluation, using a high performance Java implementation running standard benchmarks, shows that mark-split can significantly reduce collection times compared with mark-sweep and requires little extra space to do so. The overhead to the cost of marking is moderate and often pays off for itself by avoiding the sweep phase. Since there is no guarantee that this is always the case, we also propose adaptive schemes that try to combine the best performance characteristics of mark-split and mark-sweep collection.
[1]
Christian Queinnec,et al.
Mark DURING Sweep rather than Mark THEN Sweep
,
1989,
PARLE.
[2]
R. J. M. Hughes.
A semi‐incremental garbage collection algorithm
,
1982
.
[3]
John McCarthy,et al.
Recursive functions of symbolic expressions and their computation by machine, Part I
,
1960,
Commun. ACM.
[4]
Henry G. Baker,et al.
The treadmill: real-time garbage collection without motion sickness
,
1992,
SIGP.
[5]
Hans-Juergen Boehm,et al.
Reducing garbage collector cache misses
,
2000,
ISMM '00.
[6]
Soo-Mook Moon,et al.
Selective sweeping
,
2005,
Softw. Pract. Exp..
[7]
Rajiv Arora,et al.
Java server performance: A case study of building efficient, scalable Jvms
,
2000,
IBM Syst. J..
[8]
Benjamin G. Zorn,et al.
Comparing mark-and sweep and stop-and-copy garbage collection
,
1990,
LISP and Functional Programming.
[9]
Arne Andersson,et al.
Balanced Search Trees Made Simple
,
1993,
WADS.
[10]
Chris J. Cheney.
A nonrecursive list compacting algorithm
,
1970,
Commun. ACM.