Liveness-Based Garbage Collection for Lazy Languages
Prasanna Kumar. K, Amitabha Sanyal, Amey Karkare

TL;DR
This paper introduces a liveness-based garbage collection technique for lazy functional languages, reducing peak memory usage by analyzing and preserving only live heap data during collection.
Contribution
It extends liveness analysis and garbage collection methods to lazy languages, addressing challenges posed by closures and non-deterministic execution order.
Findings
Significant decrease in peak memory requirements.
Reduction in the number of garbage collections.
Execution times remain comparable to traditional collectors.
Abstract
We consider the problem of reducing the memory required to run lazy first-order functional programs. Our approach is to analyze programs for liveness of heap-allocated data. The result of the analysis is used to preserve only live data---a subset of reachable data---during garbage collection. The result is an increase in the garbage reclaimed and a reduction in the peak memory requirement of programs. While this technique has already been shown to yield benefits for eager first-order languages, the lack of a statically determinable execution order and the presence of closures pose new challenges for lazy languages. These require changes both in the liveness analysis itself and in the design of the garbage collector. To show the effectiveness of our method, we implemented a copying collector that uses the results of the liveness analysis to preserve live objects, both evaluated (i.e.,…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsLogic, programming, and type systems · Formal Methods in Verification · Software Testing and Debugging Techniques
