F-Rex: Jreg and Jfree

Jfree Project

Compile-time deallocation of individual objects

This work focuses on extending Java with explicit deallocation via free statements. The idea is to detect, via static analysis, when the last reference to an object is removed. At that point we can safely reclaim the object by inserting a free statement.

We have developed two systems that use this approach to compile-time memory management:

  • Our first approach used a powerful shape analysis technique(CR:ISMM06). This technique essentially models a static reference-counting garbage collector: we model what are the references to an object and detect when references to the object are lost. At that point we can reclaim the object. Moreover, we can deallocate non-recursive structures by feeding the analysis results to a new iteration of the analysis. Overall, the technique is powerful and can scale to the SPECjvm98 benchmarks. On average it can reclaim about 54% of the memory in these programs. But,
    • It's a whole-program analysis, which makes the technique expensive, and
    • It can't deallocate recursive structures.
  • Our second approach was to develop a tool that identifies unique variables and fields in programs(CR:ISMM07). When the unique reference is dead, it's value becomes unreachable and can be reclaimed. This approach was successful in that:
    • It can reclaim recursive structures when fields in the structures are unique. This is done by adding "destructors" to Java classes.
    • It avoided a whole-program analysis by using precomputed method summaries (CR:CC07).
    • It can achieve similar savings than the previous approach, but its modular design improved the performance by an order of magnitude.

Publications

Software

Software releases for the first version of Jfree subproject is available on the site download section. Future releases will include the version of Jfree based on identifying unique references.

Last modified on July 10, 2007, at 04:01 PM