Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8045294 | 8u25 | Jesper Wilhelmsson | P3 | Resolved | Fixed | b01 |
JDK-8038287 | 8u20 | Jesper Wilhelmsson | P3 | Resolved | Fixed | b08 |
JDK-8053408 | emb-8u26 | Jesper Wilhelmsson | P3 | Resolved | Fixed | b17 |
Description
The G1 heap can currently only shrink from the top down. In applications that allocates lots of large objects this can become a problem since G1 does not move large objects. If a large object happens to be allocated near the top of the heap, G1 will not be able to shrink the heap even if there is plenty of free space below the large object.
Old regions that G1 gives a low priority to collect will also stop the heap from shrinking in a similar manner. As long as there are old regions near the top of the heap, G1 can not shrink the heap.
One way to lower the risk of allocating large objects and old regions near the top of the heap is to sort the free list and make sure that we always try to claim these regions near the bottom of the heap.
Old regions that G1 gives a low priority to collect will also stop the heap from shrinking in a similar manner. As long as there are old regions near the top of the heap, G1 can not shrink the heap.
One way to lower the risk of allocating large objects and old regions near the top of the heap is to sort the free list and make sure that we always try to claim these regions near the bottom of the heap.
Attachments
Issue Links
- backported by
-
JDK-8038287 Sort the freelist in order to shrink the heap
- Resolved
-
JDK-8045294 Sort the freelist in order to shrink the heap
- Resolved
-
JDK-8053408 Sort the freelist in order to shrink the heap
- Resolved
- duplicates
-
JDK-8028053 Reduce region fragmentation by separating region allocations by type
- Resolved
- relates to
-
JDK-7002407 G1: Improve free region management
- Open
-
JDK-8037925 CMM Testing: an allocated humongous object at the end of the heap should not prevents shrinking the heap
- Resolved
(1 relates to)