Abstract
Large applications often suffer from excessive memory consumption. The nature of these heaps, their scale and complex interconnections, makes it difficult to find the low hanging fruit. Techniques relying on dominance or allocation tracking fail to account for sharing, and overwhelm users with small details. More fundamentally, a programmer still needs to know whether high levels of consumption are too high.
We present a solution that discovers a small set of high-impact memory problems, by detecting patterns within a heap. Patterns are expressed over a novel ContainerOrContained relation, which overcomes challenges of reuse, delegation, sharing; it induces equivalence classes of objects, based on how they participate in a hierarchy of data structures. We present results on 34 applications, and case studies for nine of these. We demonstrate that eleven patterns cover most memory problems, and that users need inspect only a small number of pattern occurrences to reap large benefits.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Apache: Commons library, http://commons.apache.org
De Pauw, W., Jensen, E., Mitchell, N., Sevitsky, G., Vlissides, J., Yang, J.: Visualizing the Execution of Java Programs. In: Diehl, S. (ed.) Dagstuhl Seminar 2001. LNCS, vol. 2269, pp. 151–162. Springer, Heidelberg (2002)
Eclipse Project: Eclipse memory analyzer, http://www.eclipse.org/mat/
Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, Reading (1994)
GNU: Trove library, http://trove4j.sourceforge.net
Hill, T., Noble, J., Potter, J.: Scalable visualizations of object-oriented systems with ownership trees. J. Vis. Lang. Comput. 13(3), 319–339 (2002)
Jump, M., McKinley, K.S.: Cork: dynamic memory leak detection for garbage-collected languages. In: Symposium on Principles of Programming Languages (2007)
Kegel, H., Steimann, F.: Systematically refactoring inheritance to delegation in a class-based object-oriented programming language. In: International Conference on Software Engineering (2008)
Lengauer, T., Tarjan, R.E.: A fast algorithm for finding dominators in a flowgraph. ACM Trans. Program. Lang. Syst. 1(1), 121–141 (1979)
Mitchell, N., Schonberg, E., Sevitsky, G.: Making sense of large heaps. In: Drossopoulou, S. (ed.) ECOOP 2009. LNCS, vol. 5653, pp. 77–97. Springer, Heidelberg (2009)
Mitchell, N., Schonberg, E., Sevitsky, G.: Four trends leading to java runtime bloat. IEEE Software 27, 56–63 (2010)
Mitchell, N., Sevitsky, G.: Leakbot: An automated and lightweight tool for diagnosing memory leaks in large Java applications. In: Cardelli, L. (ed.) ECOOP 2003. LNCS, vol. 2743, Springer, Heidelberg (2003)
Mitchell, N., Sevitsky, G.: The causes of bloat, the limits of health. In: Object-oriented Programming, Systems, Languages, and Applications, pp. 245–260. ACM, New York (2007)
Novark, G., Berger, E.D., Zorn, B.G.: Efficiently and precisely locating memory leaks and bloat. In: Programming Language Design and Implementation, pp. 397–407. ACM, New York (2009)
Printezis, T., Jones, R.: Gcspy: an adaptable heap visualisation framework. In: Object-Oriented Programming, Systems, Languages, and Applications, pp. 343–358. ACM, New York (2002)
Shacham, O., Vechev, M., Yahav, E.: Chameleon: adaptive selection of collections. In: Programming Language Design and Implementation, pp. 408–418. ACM, New York (2009)
Xu, G., Rountev, A.: Precise memory leak detection for java software using container profiling. In: International Conference on Software Engineering, pp. 151–160. ACM, New York (2008)
Yourkit LLC: Yourkit profiler, http://www.yourkit.com
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2011 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Chis, A.E. et al. (2011). Patterns of Memory Inefficiency. In: Mezini, M. (eds) ECOOP 2011 – Object-Oriented Programming. ECOOP 2011. Lecture Notes in Computer Science, vol 6813. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-22655-7_18
Download citation
DOI: https://doi.org/10.1007/978-3-642-22655-7_18
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-22654-0
Online ISBN: 978-3-642-22655-7
eBook Packages: Computer ScienceComputer Science (R0)