Request for code review - 8130265: gctests/LargeObjects/large001 fails with OutOfMemoryError: Java heap space

Jesper Wilhelmsson jesper.wilhelmsson at oracle.com
Tue Aug 18 17:39:19 UTC 2015


Alexander Harlap skrev den 18/8/15 18:36:
> Hi Jesper,
>
> Here minimum_desired_capacity and  maximum_desired_capacity are calculated to
> accommodate already allocated sstuff,
> aligned_bytes_to_allocate - extra size needed to allocate new memory (gc was
> called when we failed to allocate this new memory).

Right. Would it make sense to put this new addition around line 1658 instead, 
before we start to adjust the values with respect to max_heap_size?
/Jesper

>
> Alex
>
>
> On 8/18/2015 12:15 PM, Jesper Wilhelmsson wrote:
>> Hi,
>>
>> +  minimum_desired_capacity += aligned_bytes_to_allocate;
>> +  maximum_desired_capacity += aligned_bytes_to_allocate;
>>
>> Is it desired to always increase the desired capacity rather than doing it
>> only if it is too small? E.g.:
>>
>> minimum_desired_capacity = MAX2(minimum_desired_capacity,
>> aligned_bytes_to_allocate);
>> maximum_desired_capacity = MAX2(maximum_desired_capacity,
>> aligned_bytes_to_allocate);
>>
>> Thanks,
>> /Jesper
>>
>>
>> Alexander Harlap skrev den 18/8/15 18:02:
>>> This bug was caused by  too aggressive heap shrinkage in G1.
>>>
>>> JDK-8130265 <https://bugs.openjdk.java.net/browse/JDK-8130265>
>>>
>>> Proposed fix:
>>> http://cr.openjdk.java.net/~aharlap/8130265/webrev.00
>>> <http://cr.openjdk.java.net/%7Eaharlap/8130265/webrev.00>
>>> Testing: JPRT, tonga
>>>
>>> Thank you,
>>> Alex
>>>
>



More information about the hotspot-gc-dev mailing list