RFR JDK-8141491: Unaligned memory access in Bits.c
john.r.rose at oracle.com
Tue Jan 26 18:32:56 UTC 2016
On Jan 26, 2016, at 1:04 AM, Andrew Haley <aph at redhat.com> wrote:
> I agree that memcpy is the right thing to use. It's portable and is
> inlined well on production-quality C compilers.
But it is not strong enough to uphold the Java memory model,
because it is allows to copy byte-wise, which can tear shorts,
ints, or longs, creating illegal race states.
So we try to avoid memcpy when we can.
More information about the core-libs-dev