G1 garbage collection

The G1 garbage collection algorithm was created for use with large memory heaps. This approach involves segmenting the memory heap into regions. Garbage collection, using the G1 algorithm, takes place in parallel with each heap region. 

Another part of the G1 algorithm is that when memory is deallocated, the heap space is compacted. Unfortunately, the compacting operation takes place using the Stop the World approach. 

The G1 garbage collection algorithm also prioritizes the regions based on those that have the most garbage to be collected.

The G1 name refers to Garbage-First.

To manually invoke the G1 garbage collection algorithm for your application, use the following command-line option:

-XX:+UseG1GC
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset