Skip to main content

A simple and efficient copying garbage collector for prolog

  • Conference paper
  • First Online:

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 844))

Abstract

We show how to implement efficient copying garbage collection for Prolog. We measure the efficiency of the collector compared to a standard mark-sweep algorithm on several programs. We then show how to accomodate generational garbage collection and Prolog primitives that make the implementation more difficult.

The resulting algorithms are simpler and more efficient than the standard mark-sweep method on a range of benchmarks. The total execution times of the benchmark programs are reduced by 4 to 11 percent.

This is a preview of subscription content, log in via an institution.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. K. Appleby, M. Carlsson, S. Haridi, and D. Sahlin, Garbage Collection for Prolog Based on WAM, Communications of the ACM, 31(6):719–741, June 1988.

    Google Scholar 

  2. A.W. Appel, A runtime system, Lisp and Symbolic Computation, 3(4), 1990.

    Google Scholar 

  3. A.W. Appel, Simple generational garbage collection and fast allocation, Software—Practice and Expenence,19(2):171–183, 1989.

    Google Scholar 

  4. J. Barklund, H. Millroth, Garbage cut for garbage collection of iterative Prolog programs, 3rd Symposium on Logic Programming, Salt Lake City, September 1986, IEEE.

    Google Scholar 

  5. Y. Bekkers, O. Ridoux and L. Ungaro, Dynamic Memory Management for Sequential Logic Programming Languages, Proceedings of the International Workshop on Memory Management 92, LNCS 637, Springer-Verlag, Berlin, 1992.

    Google Scholar 

  6. C.J. Cheney, A nonrecursive list compacting algorithm, Communications of the ACM, 13(11):677–678, November 1970.

    Google Scholar 

  7. J. Cohen, Garbage Collection of Linked Data Structure, Computing Surveys, 13(3):341–367, September 1981.

    Google Scholar 

  8. H. Lieberman, C. Hewitt, A real-time garbage collector based on the lifetimes of objects, Communications of the ACM, 26(6):419–429, June 1983.

    Google Scholar 

  9. F. Morris, A Time-and Space-Efficient Compaction Algorithm, Communications of the ACM, 12(9):662–665, August 1978.

    Google Scholar 

  10. W.J. Older and J.A. Rummell, An Incremental Garbage Collector for WAM-Based Prolog, Proceedings of the Joint International Conference and Symposium on Logic Programming, MIT Press, Cambridge, Mass., 1992.

    Google Scholar 

  11. D. Sahlin, Making garbage collection independent of the amount of garbage, Research Report R87008, Swedish Institute of Computer Science, 1987.

    Google Scholar 

  12. H. Schorr and W.M. Waite, An Efficient Machine-Independent Procedure for Garbage Collection in Various List Structures, Communications of the ACM, 10(8):501–506, August 1967.

    Google Scholar 

  13. H. Touati, T. Hama, A light-weight prolog garbage collector, Proceedings of the International Conference on Fifth Generation Computing Systems, 1988.

    Google Scholar 

  14. D.H.D. Warren, An Abstract Prolog Instruction Set, SRI Tech. Note 309, SRI International, Menlo Park, Calif., USA, 1983.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Manuel Hermenegildo Jaan Penjam

Rights and permissions

Reprints and permissions

Copyright information

© 1994 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Bevemyr, J., Lindgren, T. (1994). A simple and efficient copying garbage collector for prolog. In: Hermenegildo, M., Penjam, J. (eds) Programming Language Implementation and Logic Programming. PLILP 1994. Lecture Notes in Computer Science, vol 844. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-58402-1_8

Download citation

  • DOI: https://doi.org/10.1007/3-540-58402-1_8

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-58402-5

  • Online ISBN: 978-3-540-48695-4

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics