RFR(xxxs) (jdk10): 8168542: os::realloc should return a valid pointer for input size=0

Thomas Schatzl thomas.schatzl at oracle.com
Mon Mar 6 12:48:21 UTC 2017


Hi David,

On Mon, 2017-03-06 at 21:38 +1000, David Holmes wrote:
> Hi Thomas,
> 
> 
[...]
> - the code currently passes through the 0 as the number of
> > > threads!
> > No. Explicitly setting it to zero means zero refinement threads as
> > of
> > current.
> > 
> > Refinement is an optimization, as in "G1 does not absolutely need
> > refinement threads for operation", and this switch is part of the
> > incantation to disable them. The mutators will do the refinement
> > themselves.
> > 
> > There may be an inconsistency with the meaning of "0" when set
> > explicitly for this kind of threads compared to others.
> It is very bad form to have 0 as a default mean one thing, and 0 as
> an explicit value meaning something else IMHO. If 0 is a legal value
> then -1, or some other value should have been chosen to mean "use
> ergonomics".

  I agree that this is not obvious to understand. I created JDK-
8176211.

Thanks,
  Thomas



More information about the hotspot-runtime-dev mailing list