RFR: 8214377: ZGC: Don't use memset to initialize array of ZForwardingTableEntry
per.liden at oracle.com
Thu Nov 29 12:49:07 UTC 2018
Use placement new instead of memset() to avoid compiler warning/error
when using GCC 8 with -Werror=class-memaccess (memset to initialize
To avoid any undefined behavior I also added a loop to destruct the
objects properly, but this loop will be compiled down to nothing.
I ran SPECjbb2015 to see if the execution time for "Prepare Relocation
Set" was noticeably affected by this change (assuming memset does a
batter job than then loop), but I can't see any real difference. I'll
run a few more iterations over night just to make sure.
More information about the hotspot-gc-dev