RFR: 8251158: Implementation of JEP 387: Elastic Metaspace

Albert Yang albert.m.yang at oracle.com
Mon Aug 24 17:29:40 UTC 2020

Hi Thomas,

 > While this is true, I do not think this is a real problem. It only can happen if we hit 
MaxMetaspaceSize (so not: GC threshold - there, caller will increase commit quota, and 
follow up commits on the current chunk will be successful). Hitting MaxMetaspaceSize is 
very rare; the option, by default, is infinite. We may conceivably run into a pathological 
situation where we "hover" at that limit, again and again hitting it, the subsequent GCs 
releasing some loaders, enough to avoid OOM but never quite enough to get away from the 
limit for good... I don't know. Seems far fetched.

I see; thank you for the detailed example. I believe that it makes sense to include 
something like "some virtual space might be leaked, but we don't think it's a real 
problem, because ..." in `MetaspaceArena::allocate` to avoid confusing future readers.


More information about the hotspot-gc-dev mailing list