[foreign-abi] RFR: Merge openjdk/panama-foreign:foreign-memaccess
    Henry Jen 
    henryjen at openjdk.java.net
       
    Fri Mar 13 01:26:18 UTC 2020
    
    
  
On Thu, 12 Mar 2020 19:13:07 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
> Merge with foreign-memaccess
Looks good with only minor things I would like to understand.
src/jdk.incubator.foreign/share/classes/jdk/internal/foreign/MemorySegmentImpl.java line 63:
> 62:
> 63:     final static int SMALL = ACQUIRE << 1;
> 64:     final static long NONCE = new Random().nextLong();
Can there be more access mode in the future? We don't have any reserved space here. Although it's not likely to be an
issue for the value to be different between version without persistence, it's better to keep same value.
Personally I prefer to use form of 1 << n, instead of prev_value << 1.
test/jdk/java/foreign/TestByteBuffer.java line 395:
> 394:         byteBuffer.get(); // should throw
> 395:     }
> 396:
I am a little confused with this change. What can we do with the returned ByteBuffer? Should we check the liveness  in
asByteBuffer()?
-------------
PR: https://git.openjdk.java.net/panama-foreign/pull/47
    
    
More information about the panama-dev
mailing list