[foreign-memaccess] RFR: JDK-8241849: Add unsafe way to create unconfined memory segment view
Maurizio Cimadamore
mcimadamore at openjdk.java.net
Mon Mar 30 13:54:20 UTC 2020
This patch adds an extra foreign unsafe static method to create an unconfined view of an existing segment. Following
JDK-8241772, the acquire() entry point has been removed; while the common divide and conquer use cases are still
supported (via spliterator), it might be the case that some of the clients want a truly unconfined (and unsafe)
segment. This patch adds that. The new API is more powerful than just acquire() and more in sync with what existing
clients might already doing in certain cases, by calling Unsafe::invokeCleaner when working with direct buffers.
-------------
Commit messages:
- Add unsafe helper to create unconfined view of a segment
Changes: https://git.openjdk.java.net/panama-foreign/pull/73/files
Webrev: https://webrevs.openjdk.java.net/panama-foreign/73/webrev.00
Issue: https://bugs.openjdk.java.net/browse/JDK-JDK-8241849
Stats: 46 lines in 3 files changed: 45 ins; 0 del; 1 mod
Patch: https://git.openjdk.java.net/panama-foreign/pull/73.diff
Fetch: git fetch https://git.openjdk.java.net/panama-foreign pull/73/head:pull/73
PR: https://git.openjdk.java.net/panama-foreign/pull/73
More information about the panama-dev
mailing list