Unsafe.{get,put}-X-Unaligned; Efficient array comparison intrinsics

John Rose john.r.rose at oracle.com
Wed Mar 11 07:08:15 UTC 2015


On Mar 9, 2015, at 6:09 AM, Andrew Haley <aph at redhat.com> wrote:
> 
> On 03/06/2015 10:35 PM, John Rose wrote:
>> 
>> Are we missing anything else?
> 
> The Javadoc for getInt(Object o, long offset) says
> 
>     * @param o Java heap object in which the variable resides, if any, else
>     *        null
>     * @param offset indication of where the variable resides in a Java heap
>     *        object, if any, else a memory address locating the variable
>     *        statically
> 
> Do you want the specification for Unaligned methods to include
> the possibility that o is null, in which case offset is a raw
> address?  It'll work with the current implementation.

Yes.  Unaligned values occur in the middle of packet data.
Packet data can be stored in the managed heap (o != null) or out of it (o == null).

— John


More information about the panama-dev mailing list