Garbage Collection Algorithms for Java-Based Prolog Engines

  • Authors:
  • Qinan Zhou;Paul Tarau

  • Affiliations:
  • -;-

  • Venue:
  • PADL '03 Proceedings of the 5th International Symposium on Practical Aspects of Declarative Languages
  • Year:
  • 2003

Quantified Score

Hi-index 0.00

Visualization

Abstract

Implementing a Prolog Runtime System in a language like Java, which provides its own automated memory management and safety features (like built-in index checking and array initialization) requires a consistent approach to memory management based on a simple ultimate goal: minimizing total memory management time (the sum of Java's own and ours). Based on our experience with Jinni 2002 - a Java based compiled Prolog system, we analyze the existing garbage collection algorithms and propose new optimizations. In particular, we aim to have a garbage collector with least extra helper memory space yet with reasonably fast speed. Efforts are made in reducing both time and space overhead for the mark-sweep-compact algorithm. We suggest an in-place compaction algorithm and provide its implementation. As the Prolog engine uses dynamic arrays for its stacks, the impact of Java's garbage collector on the system becomes a key factor. In this context, we measure and optimize the performance of the garbage collector with the overall memory management scheme in mind.