[External] : Re: New candidate JEP: 471: Deprecate the Memory-Access Methods in sun.misc.Unsafe for Removal
John Rose
john.r.rose at oracle.com
Fri May 3 21:24:47 UTC 2024
P.S. I didn’t directly address David’s request for that magic number N.
I would just assume 32 bits as the conservative element size (for oops)
and work from there. If the cache line size is 64 bytes, then N=16.
These are robust assumptions, even if they waste a little space
when N could be 8 (because oops are 64 bits). If the objects are
flattened, N=16 is still conservatively correct, as long as they
flatten to at least 4 bytes (which is very likely, and if not just
use a primitive array). The same external considerations that
determine the D$ line size, to a value other than 64, can also
configure the parameter N, to a value other than 16. That is
how I would build David’s widget without using Unsafe.
More information about the core-libs-dev
mailing list