RFR: 8252514: ZGC: Physical memory splitting is broken
Per Liden
per.liden at oracle.com
Tue Sep 1 15:54:02 UTC 2020
Looks good!
/Per
On 8/31/20 1:51 PM, Stefan Karlsson 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