O'Reilly logo

Java EE 7 Performance Tuning and Optimization by Osama Oransa

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Understanding the Java garbage collection policies

Garbage collection is one of the features that characterize the Java language; it went through continuous improvements in the subsequent Java releases. We have the following three main types of garbage collectors:

  • Serial collector: This collector does the garbage collection in a serial (sequential) manner, followed by compacting the old space to combine the empty space for better object allocations later. This means the application will be stopped during this collection activity.
  • Concurrent mark sweep (CMS): This collector runs in parallel in two different stages—the mark stage to mark the objects that are eligible for garbage collection (three steps) and the sweep stage to remove these objects. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required