[G1]Why run Full GC at System.gc() call?

Manavjeet Singh manavjeet18295 at iiitd.ac.in
Sun Aug 23 17:54:11 UTC 2020

I was trying to understand what happens when System.gc() is called from a
java application with G1 as the garbage collector. I understood
G1CollectedHeap::collect() is called and then
But going through the code of G1CollectedHeap::try_collect() and using the
"-verbose" flag while running the java application, I realised only a full
GC will always be scheduled.
Can you please help me understand this design decision or if I am wrong in
understanding it.
Manavjeet Singh

More information about the hotspot-gc-dev mailing list