RFC: Draft JEP: Generational ZGC
Florian Weimer
fw at deneb.enyo.de
Mon Oct 17 21:29:01 UTC 2022
* Stefan Karlsson:
> Hi Leslie,
>
> Could you test if this branch compiles as expected?
> https://github.com/stefank/jdk/tree/zgc_generational_found_old_initialization
>
> I asked around and it seems like array initialization uses
> copy-initialization of the elements, and that older GCCs didn't take the
> opportunity to convert the copying into move operations. Or something
> along those lines. I've restructured the code to prevent that problem.
GCC 10 needs this patch as well.
I think the proper fix is to add a move constructor to CHeapBitMap
(and move assignment as well):
CHeapBitMap(CHeapBitMap &&) = default;
CHeapBitMap &operator=(CHeapBitMap &&) = default;
I don't see any pointers-to-self in the class definition (or its base
class), so it should work, but I only have limited means to test this.
At least it's building with the two lines added, and basic smoke
testing shows nothing amiss. But I don't know how quickly bugs in
this area would blow up in practice.
More information about the hotspot-gc-dev
mailing list