Abstract
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.
- G. Bollella. The Real-time Specification for Java. Addison-Wesley Java Series. Addison-Wesley, 2000. ISBN 9780201703238. URL https://jcp.org/aboutJava/ communityprocess/first/jsr001/rtj.pdf.Google Scholar
Digital Library
- C. Boyapati, A. Salcianu, W. Beebee, Jr., and M. Rinard. Ownership types for safe region-based memory management in Real-Time Java. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 324–337. ACM Press, 2003.. Google Scholar
Digital Library
- M. Bravenboer and Y. Smaragdakis. Strictly declarative specification of sophisticated points-to analyses. In Proceedings of the ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages, and Applications, pages 243–262. ACM Press, 2009.. Google Scholar
Digital Library
- S. Cherem and R. Rugina. Region analysis and transformation for Java programs. In Proceedings of the ACM International Symposium on Memory Management, pages 85–96. ACM Press, 2004.. Google Scholar
Digital Library
- M. V. Christiansen and P. Velschow. Region-based memory management in Java. Master’s thesis, DIKU, University of Copenhagen, May 1998.Google Scholar
- D. Gay and A. Aiken. Memory management with explicit regions. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 313–323. ACM Press, 1998.. Google Scholar
Digital Library
- D. Gay and A. Aiken. Language support for regions. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 70–80. ACM Press, 2001.. Google Scholar
Digital Library
- D. Grossman, G. Morrisett, T. Jim, M. Hicks, Y. Wang, and J. Cheney. Region-based memory management in Cyclone. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 282–293. ACM Press, 2002.. Google Scholar
Digital Library
- N. Hallenberg, M. Elsman, and M. Tofte. Combining region inference and garbage collection. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 141–152. ACM Press, 2002.. Google Scholar
Digital Library
- M. Hirzel, D. V. Dincklage, A. Diwan, and M. Hind. Fast online pointer analysis. ACM Transactions on Programming Languages and Systems, 29(2), 2007.. Google Scholar
Digital Library
- G. Kastrinis and Y. Smaragdakis. Hybrid context-sensitivity for points-to analysis. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 423–434. ACM Press, 2013.. Google Scholar
Digital Library
- O. Lhoták. Program Analysis using Binary Decision Diagrams. PhD thesis, McGill University, 2006.Google Scholar
Digital Library
- O. Lhoták and L. Hendren. Evaluating the benefits of contextsensitive points-to analysis using a BDD-based implementation. ACM Transactions on Software Engineering and Methodology, 18(1):1–53, 2008.. Google Scholar
Digital Library
- D. Liang, M. Pennings, and M. J. Harrold. Evaluating the impact of context-sensitivity on Andersen’s algorithm for Java programs. In Proceedings of the ACM SIGPLAN-SIGSOFT Workshop on Program Analysis for Software Tools and Engineering, pages 6–12. ACM Press, 2005.. Google Scholar
Digital Library
- P. Liang, O. Tripp, M. Naik, and M. Sagiv. A dynamic evaluation of the precision of static heap abstractions. In Proceedings of the ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages, and Applications, pages 411–427. ACM Press, 2010.. Google Scholar
Digital Library
- A. Milanova, A. Rountev, and B. G. Ryder. Parameterized object sensitivity for points-to analysis for Java. ACM Transactions on Software Engineering and Methodology, 14(1):1–41, 2005.. Google Scholar
Digital Library
- M. Naik, A. Aiken, and J. Whaley. Effective static race detection for Java. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 308–319. ACM Press, 2006.. Google Scholar
Digital Library
- OpenJDK. Graal Project. URL http://openjdk.java.net/ projects/graal.Google Scholar
- F. Qian and L. Hendren. An adaptive, region-based allocator for java. In Proceedings of the ACM International Symposium on Memory Management, pages 127–138. ACM Press, 2002. Google Scholar
Digital Library
- .Google Scholar
- G. Salagnac, C. Rippert, and S. Yovine. Semi-automatic region-based memory management for real-time java embedded systems. In Embedded and Real-Time Computing Systems and Applications, pages 73–80. IEEE Computer Society, 2007.. Google Scholar
Digital Library
- M. Sharir and M. Pnueli. Two approaches to interprocedural data flow analysis. Program Flow Analysis: Theory and Applications, pages 189–234, 1981.Google Scholar
- O. G. Shivers. Control-flow Analysis of Higher-order Languages of Taming Lambda. PhD thesis, Carnegie Mellon University, 1991. Google Scholar
Digital Library
- Y. Smaragdakis and G. Balatsouras. Pointer analysis. Foundations and Trends in Programming Languages, 2(1):1–69, 2015..Google Scholar
Digital Library
- Y. Smaragdakis, M. Bravenboer, and O. Lhoták. Pick your contexts well: Understanding object-sensitivity. In Proceedings of the ACM SIGPLAN Symposium on Principles of Programming Languages, pages 17–30. ACM Press, 2011.. Google Scholar
Digital Library
- SPEC. SPECjbb2005, 2005. URL http://www.spec.org/ jbb2005.Google Scholar
- B. Steensgaard. Thread-specific heaps for multi-threaded programs. In Proceedings of the ACM International Symposium on Memory Management, pages 18–24. ACM Press, 2000.. Google Scholar
Digital Library
- M. Tofte, L. Birkedal, M. Elsman, and N. Hallenberg. A retrospective on region-based memory management. Higher-Order and Symbolic Computation, 17(3):245–265, Sept. 2004.. Introduction Background Region-Based Memory Management Points-to Analysis Memory Region Aware Points-to Analysis Analysis Definition Analysis Results Example Region Analysis Invariant Hybrid Memory Management Efficient Allocation Efficient Garbage Collection Implementation Evaluation Related Work Conclusions Google Scholar
Digital Library
Index Terms
Safe and efficient hybrid memory management for Java
Recommendations
Safe and efficient hybrid memory management for Java
ISMM '15: Proceedings of the 2015 International Symposium on Memory ManagementJava 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 ...
An efficient garbage collection for flash memory-based virtual memory systems
As more consumer electronics adopt monolithic kernels, NAND flash memory is used for the swap space in virtual memory systems. While flash memory has the advantages of low-power consumption, shock-resistance and non-volatility, it requires garbage ...
An efficient garbage collection policy for flash memory based swap systems
ICCSA'07: Proceedings of the 2007 international conference on Computational science and its applications - Volume Part IMobile computing devices use flash memory as a secondary storage because it has many attractive features such as small size, fast access speeds, shock resistance, and light weight. Mobile computing devices exploit a swap system to extend a limited main ...






Comments