RFR: 8342102: ZGC: Optimize copy constructors in ZPhysicalMemory [v2]

Joel Sikström jsikstro at openjdk.org
Wed Oct 16 08:29:48 UTC 2024


On Wed, 16 Oct 2024 07:36:54 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> Checking and returning `*this` seems fine to me. Seems like the least surprising solution. 
>> 
>> The copy assignment operator is currently only ever used in a gtest.
>
> Agreed that checking, and returning `*this` is the preferable way to handle it.  I offered the assert option in
> case there was some concern about doing that.

I've added a self-assignment check in a new commit.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/21523#discussion_r1802600353


More information about the hotspot-gc-dev mailing list