RFR: 8224820: ZGC: Support discontiguous heap reservations

Erik Österlund erik.osterlund at oracle.com
Fri Aug 9 09:59:38 UTC 2019


Today ZGC reserves a huge chunk of virtual address space when the JVM 
starts. This typically succeeds because we grab the VA before anyone 
else has time to do so. But if some ASLR library or something was to 
grab a tiny part of the desired VA, ZGC can't start. We should support 
discontiguous heap reservations to support this.

On linux, by default, this does not happen. But on OS X, it does happen 
relatively frequently. So we need to fix this to allow a mac port.

This patch implements a recursive algorithm for finding holes at 2MB 
granularities in the normally contiguous reservation when initializing 
the heap, removing them from our VA.

This patch depends on 8224815, which depends on 8229189 and 8229278. 
They are all out for review.




More information about the hotspot-gc-dev mailing list