Question about VirtualSpace and MPSS support

Erik Helin erik.helin at
Mon Nov 21 07:36:26 UTC 2016

On 11/17/2016 12:27 PM, Thomas Stüfe wrote:
> I wonder why VirtualSpace keeps the unaligned high water mark around
> instead of, say, just rounding _high up to the next page boundary. A
> simpler approach would have been to advance _high to the next page
> boundary and just forget the exact increments the caller requested.
> Then, caller needs to deal with the fact that an VirtualSpace may expand
> by more than the requested size, and for future size calculations always
> needs to refer to VirtualSpace::high(). This could be a cleanup for jdk10.

Well, you would have to make sure that all code that uses 
VirtualSpace::expand_by today can deal with this change in semantics. 
The benefit of the change also hinges on how much of the code that uses 
VirtualSpace today needs to keep track of how much a VirtualSpace have 
expanded (without aligning to page size). If a lot of code need this 
functionality, then you will just be moving it out of VirtualSpace and 
into a number of places spread throughout the code. OTOH, if very little 
code requires this knowledge, then the change might be worth it.

One could also consider writing a wrapper around VirtualSpace that keeps 
track of exactly this information.


> Thanks, Thomas

More information about the hotspot-runtime-dev mailing list