Prioritized Garbage Collection: Explicit GC Support for Software Caches
Diogenes Nunez, Samuel Z. Guyer, Emery D. Berger

TL;DR
This paper introduces prioritized garbage collection, a new runtime support mechanism that allows applications to specify object priorities for more efficient cache management and memory utilization in managed languages.
Contribution
It presents a novel API for defining object reclamation policies based on priority, enabling space-aware caching with automatic memory management adjustments.
Findings
Implemented a space-aware LRU cache called Sache as a drop-in replacement.
Sache adapts to workload and memory conditions with minimal programmer input.
Reduces memory leaks, pressure, and crashes caused by caching in managed languages.
Abstract
Programmers routinely trade space for time to increase performance, often in the form of caching or memoization. In managed languages like Java or JavaScript, however, this space-time tradeoff is complex. Using more space translates into higher garbage collection costs, especially at the limit of available memory. Existing runtime systems provide limited support for space-sensitive algorithms, forcing programmers into difficult and often brittle choices about provisioning. This paper presents prioritized garbage collection, a cooperative programming language and runtime solution to this problem. Prioritized GC provides an interface similar to soft references, called priority references, which identify objects that the collector can reclaim eagerly if necessary. The key difference is an API for defining the policy that governs when priority references are cleared and in what order.…
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.
