RFR: 8252514: ZGC: Physical memory splitting is broken
Stefan Karlsson
stefan.karlsson at oracle.com
Tue Sep 1 07:10:06 UTC 2020
Thanks, Erik.
StefanK
On 2020-08-31 22:13, Erik Österlund wrote:
> Hi Stefan,
>
> Looks good.
>
> Thanks,
> /Erik
>
>> On 31 Aug 2020, at 13:51, Stefan Karlsson <stefan.karlsson at oracle.com> wrote:
>>
>> Hi all,
>>
>> Please review this patch to fix physical memory splitting in ZGC.
>>
>> https://cr.openjdk.java.net/~stefank/8252514/webrev.01/
>> https://bugs.openjdk.java.net/browse/JDK-8252514
>>
>> JDK-8247759 changed the implementation to use a GrowableArray. One part of that patch cached the value of _segments.at(index) inside commit_segment and uncommit_segment. This is incorrect, since resizing the array causes the backing memory to be deallocated, causing the the local copy to point to garbage.
>>
>> I've reverted that change, and now always call _segments.at(index) instead.
>>
>> This was found while experimenting with physical memory allocations that were likely to fail. I've verified that the failures stops reproducing with this patch.
>>
>> Thanks,
>> StefanK
>
More information about the hotspot-gc-dev
mailing list