Safe and efficient hybrid memory management for Java
Codruţ Stancu, Christian L. Wimmer, Stefan Brunthaler et al. · International Symposium on Memory Management · 2015
Java uses automatic memory management, usually implemented as a garbage-collected heap. That lifts the burden of manually allocating and deallocating memory, but it can incur significant runtime overhead and increase the memory footprint of applications. We propose a hybrid memory management scheme that utilizes region-based memory management to deallocate objects automatically on region exits. Static program analysis detects allocation sites that are safe for region allocation, i.e., the static analysis proves that the objects allocated at such a site are not reachable after the region exit. A regular garbage-collected heap is used for objects that are not region allocatable. The region allocation exploits the temporal locality of object allocation. Our analysis uses coarse-grain source code annotations to disambiguate objects with non-overlapping lifetimes, and maps them to different memory scopes. Region-allocated memory does not require garbage collection as the regions are simply deallocated when they go out of scope. The region allocation technique is backed by a garbage collector that manages memory that is not region allocated. We provide a detailed description of the analysis, provide experimental results showing that as much as 78% of the memory is region allocatable and discuss how our hybrid memory management system can be implemented efficiently with respect to both space and time.
Cited by 11 works. doi:10.1145/2754169.2754185 Open-access PDF
Authors
References
- The real-time specification for Java
- Two approaches to interprocedural data flow analysis
- Region-Based Memory Management
- Control-flow analysis of higher-order languages of taming lambda
- Region-based memory management in cyclone
- Memory management with explicit regions
- Parameterized object sensitivity for points-to analysis for Java
- Effective static race detection for Java
- Effective static race detection for Java
- Language support for regions