-
Bug
-
Resolution: Fixed
-
P2
-
None
-
b32
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8014589 | 8 | Bengt Rutisson | P2 | Closed | Fixed | b90 |
JDK-8020249 | 7u60 | Bengt Rutisson | P2 | Resolved | Fixed | b01 |
JDK-8019899 | 7u45 | Bengt Rutisson | P2 | Closed | Fixed | b02 |
JDK-8017500 | 7u40 | Unassigned | P2 | Closed | Duplicate | b32 |
JDK-8017563 | hs24 | Bengt Rutisson | P2 | Closed | Fixed | b51 |
We set min_alignment to the G1 heap region size, but we set max_alignment to the card table alignment.
The max_alignment is used to align the heap up. If the heap region size is larger than the card table alignment we may end up with a heap size that is not aligned to the heap region.
Here is a command line that fails on my machine:
$ java -XX:MaxRAMFraction=10 -XX:+UseG1GC -XX:G1HeapRegionSize=8m -version
Error occurred during initialization of VM
Size of g1 heap (859832320 bytes) must be aligned to 8388608 bytes
The test in Universe::check_alignment() fails even though the heap size was picked ergonomically. This is because the heap size is card table aligned rather than heap region aligned.
ILW=HML -> P2
The simplest workaround is to set the heap size on the command line to a value that is heap region size aligned.
The max_alignment is used to align the heap up. If the heap region size is larger than the card table alignment we may end up with a heap size that is not aligned to the heap region.
Here is a command line that fails on my machine:
$ java -XX:MaxRAMFraction=10 -XX:+UseG1GC -XX:G1HeapRegionSize=8m -version
Error occurred during initialization of VM
Size of g1 heap (859832320 bytes) must be aligned to 8388608 bytes
The test in Universe::check_alignment() fails even though the heap size was picked ergonomically. This is because the heap size is card table aligned rather than heap region aligned.
ILW=HML -> P2
The simplest workaround is to set the heap size on the command line to a value that is heap region size aligned.
- backported by
-
JDK-8017500 G1: G1CollectorPolicy::initialize_flags() may set min_alignment > max_alignment
- Closed
-
JDK-8020249 G1: G1CollectorPolicy::initialize_flags() may set min_alignment > max_alignment
- Resolved
-
JDK-8014589 G1: G1CollectorPolicy::initialize_flags() may set min_alignment > max_alignment
- Closed
-
JDK-8017563 G1: G1CollectorPolicy::initialize_flags() may set min_alignment > max_alignment
- Closed
-
JDK-8019899 G1: G1CollectorPolicy::initialize_flags() may set min_alignment > max_alignment
- Closed