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

Alexander Harlap alexander.harlap at oracle.com
Tue Aug 18 16:36:47 UTC 2015


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).

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