JDK-7078465 : G1: Don't use the undefined value (-1) for the G1 old memory pool max size
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: hs22
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2011-08-12
  • Updated: 2013-10-04
  • Resolved: 2012-03-24
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.
JDK 7 JDK 8 Other
7u4Fixed 8Fixed hs23Fixed
Related Reports
Relates :  
Description
Currently, all three G1 memory pools return "undefined" (i.e., -1) for their max size. This decision was made because they don't have fixed boundaries so potentially any pool can grow to the entire heap (almost at least).

Jon Masamitsu made a good suggestion that maybe the old gen pool should return a max size that's the same as the entire heap max size, whereas leave the eden and survivor pools to return undefined. We should do this, as long as it doesn't break any assumptions in testing and/or the rest of the memory pool framework.
Similarly, we should consider setting the old minimum capacity to the heap minimum capacity. This is only used by jstat and currently we set the minimum capacity of all the spaces to 0.
Actually, setting the old gen min capacity to the heap min capacity doesn't really make sense. If the heap is at minimum capacity, the old gen capacity is likely to be under that, since we usually need space for the young gen too. So, the heap min capacity doesn't make sense as a lower bound for the old gen min capacity.

We'll only implement the change for the old memory pool max size.

Comments
EVALUATION http://hg.openjdk.java.net/lambda/lambda/hotspot/rev/a8a126788ea0
22-03-2012

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-gc/hotspot/rev/a8a126788ea0
19-01-2012