Liveness-based garbage collection for lazy languages
-
Published:2018-07-19
Issue:11
Volume:51
Page:122-133
-
ISSN:0362-1340
-
Container-title:ACM SIGPLAN Notices
-
language:en
-
Short-container-title:SIGPLAN Not.
Author:
Kumar K. Prasanna1,
Sanyal Amitabha1,
Karkare Amey2
Affiliation:
1. IIT Bombay, India
2. IIT Kanpur, India
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. Whereas 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 and closures. Our experiments confirm that for programs running with a liveness-based garbage collector, there is a significant decrease in peak memory requirements. In addition, a sizable reduction in the number of collections ensures that in spite of using a more complex garbage collector, the execution times of programs running with liveness and reachability-based collectors remain comparable.
Publisher
Association for Computing Machinery (ACM)
Subject
Computer Graphics and Computer-Aided Design,Software
Reference40 articles.
1. (Last Accessed). (Last Accessed).
2. (Last Accessed). (Last Accessed).
3. NoFib: Haskell Benchmark Suite. http://git.haskell. org/nofib.git Nov 2015. (Last accessed). NoFib: Haskell Benchmark Suite. http://git.haskell. org/nofib.git Nov 2015. (Last accessed).