Request for review: 8020530 Non heap memory size calculated incorrectly
dmitry.samersoff at oracle.com
Wed Aug 21 04:37:45 PDT 2013
Looks good for me.
On 2013-08-21 14:40, Vladimir Kempik wrote:
> Thanks everyone for comments.
> Here is updated webrev
> On 21.08.2013 1:52, Mandy Chung wrote:
>> On 8/20/2013 5:38 AM, Staffan Larsen wrote:
>>> That doesn't make a lot of sense to me. Why would a pool have
>>> undefined values?
>>> The Metaspace pool has no max value (unless you specify
>>> -XX:MaxMetaspaceSize=), thus undefined.
>>>> If a subset of pools have undefined values why report completely
>>>> fallacious values of -1?
>>> The javadoc for MemoryUsage says getMax() returns -1 if the maximum
>>> memory size is undefined.
>> Yes the spec allows implementation of memory pools with undefined
>> max. "used" and "committed" must have a value and the "committed"
>> memory is guaranteed to be available for the VM to use. "max" will
>> give an idea of the upper bound how much memory can be allocated from
>> it; however, there is no guarantee that amount of memory is available
>> for the VM.
>>>> It also isn't clear how this relates to the "committed" value in the
>>>> failure. What gets reported now?
>>> I guess there can still be a committed value even if we don't have a
>>> max value for how much we might commit in the future: used <=
>>> committed <= max.
>> The MemoryUsage constructor throws IAE if committed > max if max is
>> defined. Perhaps it would be better if max should be Long.MAX_VALUE
>> if undefined (a different issue than this bug).
Oracle Java development team, Saint Petersburg, Russia
* I would love to change the world, but they won't give me the sources.
More information about the hotspot-dev