Abstract
In a static typechecking language, such as ML, the type information produced by the typechecker can be forgotten during execution. But in many cases, a minimal type information (tag) is needed for the Garbage Collector (GC). In this paper, I propose a simple, safe and efficient GC algorithm which does not use any tags to distinguish immediate values and pointers.
This GC is a conservative Mark&Sweep (which does not move objects) with ambiguous roots (there is a possibility of ambiguity between immediate values and pointers). It is used for a runtime library added to C for an ML compiler to C (CeML) where basic data types are identical to those in C (int, float). However the GC uses a disambiguating strategy which is shown to be safe. It can be used also for other polymorphic languages with static typechecking and uniform data representation.
Preview
Unable to display preview. Download preview PDF.
References
Appel, A. Runtime Tags Aren't Necessary. Lisp and Symbolic Computation (1989).
Appel, A., McQueen, D., and David, B. A Standard ML Compiler. Functional Programming Languages and Computer Architecture (1987).
Bartlett, J. F. Compacting Garbage Collection with Ambiguous Roots. Tech. Rep. 88/2, Digital Equipement Corporation (WRL), Feb. 1988.
Boehm, H., and Weiser, M. Garbage Collection in an Uncooperative Environment. Software — Practice and Experience (Sept. 1988).
Chailloux, E. Compilation des langages fonctionnels: CeML un traducteur ML vers C. Thèse d'université, Université Paris VII, Nov. 1991.
Chailloux, E. An Efficient Way of Compiling ML to C. In Workshop on ML and its Applications (San Francisco, June 1992), ACM SIGPLAN.
Edelson, D. A Mark-and-Sweep Collector for C++. In Principles Of Programming Languages (Albuquerque, 1992), ACM.
Goldberg, B. Tag-Free Garbage Collection for Strongly Typed Programming Languages. In Programming Language Design and Implementation (1991), ACM.
Johnsson, T. Lambda lifting: transforming programs to recursive equations. In Conference on Functional Programing Languages and Computer Architecture. LNCS 201 (Nancy, 1985), ACM, Springer Verlag.
Knuth, D. The Art of Computer Programming: Fundamental Algorithms, vol. 1. Addison Wesley 3821, 1973.
Leroy, X. The ZINC experiment: an economical implementation of the ML language. Tech. Rep. 117, INRIA, Feb. 1990.
Leroy, X. Unboxed Objects and Polymorphic Typing. In Principles Of Programming Languages (Albuquerque, 1992), ACM.
McCarthy, J. Recursive Functions of Symbolic Expressions and Their Computation by Machine. Communications of the ACM (1960).
Minsky, M. A Lisp Garbage Collector Algorithm Using Serial Secondary Storage. Tech. Rep. Memo 58, MIT, Cambridge, Massachussets, 1963.
Morrison, R., Dearle, A., Connor, R. C. H., and Brown, L. An Ad Hoc Approach to the Implementation of Polymorphism. In Transaction on Programming Languages ans Systems (1991), ACM.
Steele, G. L. Data Representation in PDP-10 Mac Lisp. In MACSYMA Users Conference (1977).
Tarditi, D., and Acharya, A. A Guide to SML2C. Tech. rep., CMU-CS, June 1991.
Weis, P., Aponte, M. V., Laville, A., Mauny, M., and Suarez, A. The CAML Reference Manual. Tech. Rep. 121, INRIA, Sept. 1990.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1992 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Chailloux, E. (1992). A conservative garbage collector with ambiguous roots for static typechecking languages. In: Bekkers, Y., Cohen, J. (eds) Memory Management. IWMM 1992. Lecture Notes in Computer Science, vol 637. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0017192
Download citation
DOI: https://doi.org/10.1007/BFb0017192
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-55940-5
Online ISBN: 978-3-540-47315-2
eBook Packages: Springer Book Archive