Premium
A semi‐incremental garbage collection algorithm
Author(s) -
Hughes R. J. M.
Publication year - 1982
Publication title -
software: practice and experience
Language(s) - English
Resource type - Journals
SCImago Journal Rank - 0.437
H-Index - 70
eISSN - 1097-024X
pISSN - 0038-0644
DOI - 10.1002/spe.4380121108
Subject(s) - heap (data structure) , garbage collection , lisp , computer science , manual memory management , algorithm , garbage , execution time , parallel computing , programming language
Lisp is restricted in application because of d the unpredictable delays introduced by garbage collection. Incremental garbage collectors eliminate the delays, but are less efficient overall. We present a semi‐incremental algorithm that reduces the delays and is, moreover more efficient than the mark‐scan algorithm from which it is derived. The mark‐scan algorithm is explained it consists of a mark phase followed by a sweep phase. The sweep phase can be performed incrementally, but the mark phase cannot. If this modification is made, our semi‐incremental algorithm is derived. Using the new algorithm the delay on garbage collection is proportional to the amount of heap actually in use, not the size of the heap. Allocating a cell takes a variable amount of time, depending on the proportion of the heap in use. Comparing the number of operations in the old and new algorithms, we see that the new algorithm is more efficient. The new algorithm was used as part of a Lisp implementation on an LSI‐11/03 and found to behave well.