What is the difference between G1 GC’s young, survivor, and old regions and what triggers a mixed collection?

Java Professional Hard

Java Professional — Hard

What is the difference between G1 GC’s young, survivor, and old regions and what triggers a mixed collection?

Key points

  • G1 dynamically assigns regions to different parts of the heap
  • Mixed collections are triggered by old region occupancy exceeding a threshold
  • Young and selected old regions are collected during mixed collections

Ready to go further?

Related questions