Improving memory usage in the BEAM

  • Authors:
  • Ricardo Lopes;Vítor Santos Costa

  • Affiliations:
  • DCC-FC & LIACC, University of Porto, Porto, Portugal;COPPE/Sistemas, Universidade Federal do Rio de Janeiro, Brasil

  • Venue:
  • PADL'05 Proceedings of the 7th international conference on Practical Aspects of Declarative Languages
  • Year:
  • 2005

Quantified Score

Hi-index 0.00

Visualization

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.