Garbage Collection Algorithms for Java-Based Prolog Engines
Qinan Zhou6 and Paul Tarau6
| (6) |
University of North Texas, 76203 Denton, TX, USA |
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.
Keywords: Implementation of Prolog - Garbage collection algorithms in the context of multiple memory managers
References secured to subscribers.