Request for review: 8020530 Non heap memory size calculated incorrectly

Coleen Phillimore coleen.phillimore at oracle.com
Wed Aug 21 07:37:32 PDT 2013


Looks good, thanks!
Coleen

On 8/21/2013 6:40 AM, Vladimir Kempik wrote:
> Thanks everyone for comments.
>
> Here is updated webrev 
> http://cr.openjdk.java.net/~vkempik/8020530/webrev.01/
>
> Vladimir.
> 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).
>>
>> Mandy
>>
>>> /Staffan
>>>
>>>> Thanks,
>>>> David
>>>>
>>>>> Thanks,
>>>>> Vladimir
>>>>>
>>
>



More information about the hotspot-dev mailing list