top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is Garbage First Collector?

+3 votes
435 views
What is Garbage First Collector?
posted Jan 31, 2014 by Khusboo

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

2 Answers

+1 vote
 
Best answer

As we know we can not force JVM for Garbage Collection , but Java7 introduced Garbage First Collector is this new technique much powerful and resolve the issue of Memory leak sometime in application.

The first focus of G1 is to provide a solution for users running applications that require large heaps with limited GC latency. This means heap sizes of around 6GB or larger, and stable and predictable pause time below 0.5 seconds.

Applications running today with either the CMS or the ParallelOld garbage collector would benefit switching to G1 if the application has one or more of the following traits.

More than 50% of the Java heap is occupied with live data. The rate of object allocation rate or promotion varies significantly. Undesired long garbage collection or compaction pauses (longer than 0.5 to 1 second)

answer Jan 31, 2014 by Neeraj Pandey
0 votes

The collector splits the heap up into fixed-size regions and tracks the live data in those regions. It keeps a set of pointers — the "remembered set" — into and out of the region. When a GC is deemed necessary, it collects the regions with less live data first (hence, "garbage first")

answer Jun 23, 2016 by Karthick.c
...