Skip to main content

Patterns of Memory Inefficiency

  • Conference paper
ECOOP 2011 – Object-Oriented Programming (ECOOP 2011)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 6813))

Included in the following conference series:

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Apache: Commons library, http://commons.apache.org

  2. 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)

    Chapter  Google Scholar 

  3. Eclipse Project: Eclipse memory analyzer, http://www.eclipse.org/mat/

  4. Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, Reading (1994)

    MATH  Google Scholar 

  5. GNU: Trove library, http://trove4j.sourceforge.net

  6. Hill, T., Noble, J., Potter, J.: Scalable visualizations of object-oriented systems with ownership trees. J. Vis. Lang. Comput. 13(3), 319–339 (2002)

    Article  Google Scholar 

  7. Jump, M., McKinley, K.S.: Cork: dynamic memory leak detection for garbage-collected languages. In: Symposium on Principles of Programming Languages (2007)

    Google Scholar 

  8. Kegel, H., Steimann, F.: Systematically refactoring inheritance to delegation in a class-based object-oriented programming language. In: International Conference on Software Engineering (2008)

    Google Scholar 

  9. Lengauer, T., Tarjan, R.E.: A fast algorithm for finding dominators in a flowgraph. ACM Trans. Program. Lang. Syst. 1(1), 121–141 (1979)

    Article  MATH  Google Scholar 

  10. 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)

    Chapter  Google Scholar 

  11. Mitchell, N., Schonberg, E., Sevitsky, G.: Four trends leading to java runtime bloat. IEEE Software 27, 56–63 (2010)

    Article  Google Scholar 

  12. 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)

    Google Scholar 

  13. 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)

    Google Scholar 

  14. 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)

    Google Scholar 

  15. 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)

    Google Scholar 

  16. Shacham, O., Vechev, M., Yahav, E.: Chameleon: adaptive selection of collections. In: Programming Language Design and Implementation, pp. 408–418. ACM, New York (2009)

    Google Scholar 

  17. 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)

    Google Scholar 

  18. Yourkit LLC: Yourkit profiler, http://www.yourkit.com

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics