-
Sub-task
-
Resolution: Unresolved
-
P4
-
25
ZGC is now better equipped to deal with fragmentation, which is especially impactful for programs running with a large heap.
ZGC might sometimes end up in a scenario where enough memory is free in total, but dispered in smaller chunks, making the memory unusable for larger allocations. To improve the likelihood of allocations being successful, the mechanism for caching memory has been replaced with a more dynamic solution.
In the new design, pressure on the OS regarding virtual memory ranges is reduced, often leading to fewer memory mappings in the OS. Asynchronous unmapping has been removed along with associated logging and JFR event. This was the last dependency on multi-mapped memory in ZGC, which is no longer used.
ZGC might sometimes end up in a scenario where enough memory is free in total, but dispered in smaller chunks, making the memory unusable for larger allocations. To improve the likelihood of allocations being successful, the mechanism for caching memory has been replaced with a more dynamic solution.
In the new design, pressure on the OS regarding virtual memory ranges is reduced, often leading to fewer memory mappings in the OS. Asynchronous unmapping has been removed along with associated logging and JFR event. This was the last dependency on multi-mapped memory in ZGC, which is no longer used.