Copying Garbage Collection for the WAM: To Mark or Not to Mark?
- Bart DemoenAffiliated withDept. of Computer Science
- , Phuong-Lan NguyenAffiliated withInstitut de Mathématiques Appliquées, UCO
- , Ruben VandeginsteAffiliated withDept. of Computer Science
Garbage collection by copying is becoming more and more popular for Prolog. Copying requires a marking phase in order to be safe: safeness means that the to-space is guaranteed not to overflow. However, some systems use a copying garbage collector without marking prior to copying, and instead postpone the copying of potentially unsafe cells. Such systems only collect small portions of the heap and it is not clear whether postponing works while collecting the whole heap. Moreover, it is shown here that postponing does not solve the problem in a fundamental way. Since marking takes time, it is worth studying the tradeoffs involved. These observations have prompted the experimentation with a series of garbage collectors based on copying without marking and without postponing. In particular, variants were implemented that are named dangerous, optimistic and cautious copying which exhibit various degrees of unsafeness. Versions of each have been implemented based on recursive copying as in most implementations of copy_term/2 and on the Cheney algorithm. Performance on benchmarks suggests that large performance gains can be obtained by skipping the marking phase, that dangerous copying is still relatively safe but can be costly, and that the additional effort of cautious copying over optimistic copying is not worth it. The optimistic collectors based on recursive copying perform best and slightly better than the ones based on Cheney. Cache performance measurements back up the benchmark results.
- Copying Garbage Collection for the WAM: To Mark or Not to Mark?
- Book Title
- Logic Programming
- Book Subtitle
- 18th International Conference, ICLP 2002 Copenhagen, Denmark, July 29 – August 1, 2002 Proceedings
- pp 194-208
- Print ISBN
- Online ISBN
- Series Title
- Lecture Notes in Computer Science
- Series Volume
- Series ISSN
- Springer Berlin Heidelberg
- Copyright Holder
- Springer-Verlag Berlin Heidelberg
- Additional Links
- Industry Sectors
- eBook Packages
- Peter J. Stuckey (4)
- Editor Affiliations
- 4. Department of Computer Science and Software Engineering, University of Melbourne
- Author Affiliations
- 5. Dept. of Computer Science, K.U.Leuven, Belgium
- 6. Institut de Mathématiques Appliquées, UCO, Angers, France
To view the rest of this content please follow the download PDF link above.