[foreign-memaccess+abi] RFR: 8265760: Memory segments/addresses should have an isNative predicate [v2]

Maurizio Cimadamore mcimadamore at openjdk.java.net
Fri Apr 23 16:24:54 UTC 2021


> This patch adds an `isNative` predicate to both `MemorySegment` and `MemoryAddress`. Note that, for segments, `isMapped` implies `isNative`.
> 
> It also moves all the methods from `MappedMemorySegments` back into `MemorySegment` (these methods will still throw if invoked on a segment that is not a mapped segment).
> 
> Some javadoc tweaking occurred here - MemorySegment now has a new section fully dedicated to mapped segments (note that now mapped segments are presented as a special class of native segments).
> 
> Also, in MemoryAddress, the concept of "native memory address" is introduced to talk about off-heap addresses, which simplifies some of the javadoc.
> 
> This way, the resulting API is tighter, and using mapped segments is slightly more direct.

Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision:

  Replace JNI javadoc reference with CLinker

-------------

Changes:
  - all: https://git.openjdk.java.net/panama-foreign/pull/514/files
  - new: https://git.openjdk.java.net/panama-foreign/pull/514/files/c21a88d2..3c5fc2ac

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=panama-foreign&pr=514&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=panama-foreign&pr=514&range=00-01

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/panama-foreign/pull/514.diff
  Fetch: git fetch https://git.openjdk.java.net/panama-foreign pull/514/head:pull/514

PR: https://git.openjdk.java.net/panama-foreign/pull/514


More information about the panama-dev mailing list