Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Summary

In this chapter, we've touched on one of Java's more advanced concepts: garbage collection. We've just skimmed the surface of this advanced topic, with an eye toward providing you with the basic information for optimizing your own applications. If you really get into optimization, you can find whole books written about the subject.

In this brief overview, we covered:

  • Memory allocation
  • The garbage-collection algorithm used by Java
  • The variations on the algorithm (naïve, incremental, and concurrent)
  • How the G1 collector improves on the overall algorithm
  • The difference between a scavenge and a full collection
  • That garbage collection is event-driven
  • That garbage collection is beyond our direct control, but can be controlled indirectly

  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint