Software garbage collection
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. Application code specifies a priority value for each reference and a target memory bound. The collector reclaims references, lowest priority first, until the total memory footprint of the cache fits within the bound. We use this API to implement a space-aware least-recently-used (LRU) cache, called a Sache, that is a drop-in replacement for existing caches, such as Google's Guava library. The garbage collector automatically grows and shrinks the Sache in response to available memory and workload with minimal provisioning information from the programmer. Using a Sache, it is almost impossible for an application to experience a memory leak, memory pressure, or an out-of-memory crash caused by software caching.
Submission history
From: Emery Berger [view email]
How to delete snapchat messages? How to open master lock 4 digit combination? What is the spiritual meaning of seeing blue jays? how to improve visual imagination What mkes houseplant leaf turning black at the tips? How to calculate medicare wages and tips form 941? What is immunocompromised meaning? How to make your pussy feel good? advice to give to a friend who is grieving How to get 100 va disability? what is.the difference between n95 and kn95 What is the meaning of daddy issues? what is the difference between lightheadedness and dizziness How to get a gorl to like you? what are several ways to develop leadership skills what advice would you give to a firm that wants to exploit network effects? How many skill tricks per turn? what is the difference between sbr and pistol What does it mean to be gay? How to ge? what is 10-key skills what good advice did obi wan kenobi give luke How to tame a parrot in minecraft? What is wire fraud? what churches provide with tax advice What does ave maria mean? what if a paralegal gives advice in her own practice How to clean your room? what skills do colleges look for What is the meaning of bibble? What does nifty mean? what welfare benefits are available How to lower blood pressure on the spot? what tends to happen when older people over the age of 80 learn new skills but do not apply them? what benefits can a pregnant teenager get what is the difference between tungsten and tungsten carbide love it when people give advice they themselves should adhere to What does a vagina look like? What does alchemist mean? how to use critical thinking skills How to unblock numbers on iphone? what difference does it make the smiths what are the benefits of kale and spinach How to get self tanner off?