JDK-8049332 : G1 full GC does not compact into humongous regions freed in the same collection
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 8u40,9
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2014-07-04
  • Updated: 2018-03-29
  • Resolved: 2018-03-29
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbd_majorFixed
Related Reports
Relates :  
Relates :  
Description
Given the following heap region type layout at the start of a full GC:

SCCCscccSCCCOOO.... 

(Legend:
S = humongous starts region
C = humongous continues region
s = humongous starts region that is going to be freed in this full GC
c = humongous continues region to be freed in this full GC
O = region containing live old data
 . = free region
)

At the end of full GC the heap looks like this:

SCCC...SCCCOOO....

I.e. during compaction the full GC did not consider the not live humongous regions as compaction targets. This may leave some space unnecessarily committed after full GC particularly as humongous objects are never moved.
Comments
This is no longer an issue after JEP 307: Parallel Full GC for G1, which was added in JDK 10. Free humongous regions are now added to the compaction queues the same way as other empty region. This might be revised again going forward, because it might not always be good to compact into free regions. But this RFE is no longer valid.
29-03-2018

The issue needs to be verified first.
30-01-2017