Skip to main content

Improving Memory Usage in the BEAM

  • Conference paper
Practical Aspects of Declarative Languages (PADL 2005)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 3350))

Included in the following conference series:

Abstract

A critical issue in the design of logic programming systems is their memory performance, both in terms of total memory usage and locality in memory accesses. BEAM, as most modern Prolog systems, requires both good emulator design and good memory performance for best performance. We report on a detailed study of the memory management techniques used on our sequential implementation of the EAM. We address questions like how effective are the techniques the BEAM uses to recover and reuse memory space, how garbage collection affects performance and how to classify and unify variables in a EAM environment. We also propose a finer variable allocation scheme to reduce memory overheads that is quite effective at reducing memory pressure, with only a small overhead.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Ali, K.A.M.: A Simple Generational Real-Time Garbage Collection Scheme. New Generation Computing 16(2), 201–221 (1998)

    Article  Google Scholar 

  2. Appleby, K., Carlsson, M., Haridi, S., Sahlin, D.: Garbage collection for Prolog based on WAM. Communications of the ACM 31(6), 171–183 (1989)

    Google Scholar 

  3. Bevemyr, J., Lindgren, T.: PLILP 1994. LNCS, vol. 844, pp. 88–101. Springer, Heidelberg (1994)

    Google Scholar 

  4. Castro, L.F., Santos Costa, V.: Understanding Memory Management in Prolog Systems. In: Codognet, P. (ed.) ICLP 2001. LNCS, vol. 2237, p. 11. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  5. Demoen, B., Nguyen, P.: So Many WAM Variations, So Little Time. In: Palamidessi, C., Moniz Pereira, L., Lloyd, J.W., Dahl, V., Furbach, U., Kerber, M., Lau, K.-K., Sagiv, Y., Stuckey, P.J. (eds.) CL 2000. LNCS (LNAI), vol. 1861, pp. 1240–1254. Springer, Heidelberg (2000)

    Chapter  Google Scholar 

  6. Detlefs, D., Dosser, A., Zorn, B.: Memory allocation costs in large C and C++ programs. Software, Practice and Experience 24(6) (1994)

    Google Scholar 

  7. Gupta, G., Warren, D.H.D.: An Interpreter for the Extended Andorra Model. Technical report, Dep. of Computer Science, University of Bristol (November 1991)

    Google Scholar 

  8. Jaffar, J., Maher, M.: Constraint Logic Programming: a Survey. The Journal of Logic Programming 19/20 (May/July 1994)

    Google Scholar 

  9. Jones, R., Lins, R.: Garbage Collection: Algorithms for Automatic Dynamic Memory Management. John Wiley and Sons, Chichester (1996) (reprinted February 1997)

    Google Scholar 

  10. Lopes, R.: An Implementation of the Extended Andorra Model. PhD thesis, Universidade do Porto (December 2001)

    Google Scholar 

  11. Lopes, R., Castro, L., Costa, V.: From Simulation to Pratice: Cache Performance Study of a Prolog Systems. ACM SIGPLAN Notices 38(2), 56–64 (2003)

    Article  Google Scholar 

  12. Lopes, R., Costa, V.S., Silva, F.: A novel implementation of the extended Andorra model. In: Ramakrishnan, I.V. (ed.) PADL 2001. LNCS, vol. 1990, pp. 199–213. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  13. Lopes, R., Costa, V.S., Silva, F.: On deterministic computations in the extended andorra model. In: Palamidessi, C. (ed.) ICLP 2003. LNCS, vol. 2916, pp. 407–421. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  14. Lopes, R., Santos Costa, V., Silva, F.: Prunning in the extended andorra model. In: Jayaraman, B. (ed.) PADL 2004. LNCS, vol. 3057, pp. 120–134. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

  15. Ozawa, T., Hosoi, A., Hattori, A.: Generation Type Garbage Collection for Parallel Logic Languages. In: Proceedings of the North American Conference on Logic Programming, pp. 291–305. MIT Press, Cambridge (1990)

    Google Scholar 

  16. Santos Costa, V.: Optimising bytecode emulation for prolog. In: Nadathur, G. (ed.) PPDP 1999. LNCS, vol. 1702, pp. 261–267. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

  17. Shapiro, E.: The family of Concurrent Logic Programming Languages. ACM computing surveys 21(3), 412–510 (1989)

    Article  Google Scholar 

  18. Warren, D.H.D.: An Abstract Prolog Instruction Set. Technical Note 309, SRI International (1983)

    Google Scholar 

  19. Warren, D.H.D.: The Extended Andorra Model with Implicit Control. Presented at ICLP 1990 Workshop on Parallel Logic Programming, Eilat, Israel (June 1990)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2005 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Lopes, R., Costa, V.S. (2005). Improving Memory Usage in the BEAM. In: Hermenegildo, M.V., Cabeza, D. (eds) Practical Aspects of Declarative Languages. PADL 2005. Lecture Notes in Computer Science, vol 3350. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-30557-6_12

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-30557-6_12

  • Publisher Name: Springer, Berlin, Heidelberg

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

  • Online ISBN: 978-3-540-30557-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics