[jdk17] RFR: 8269246: Scoped ByteBuffer vector access
Maurizio Cimadamore
mcimadamore at openjdk.java.net
Wed Jun 23 20:13:27 UTC 2021
On Wed, 23 Jun 2021 19:10:41 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:
> The Foreign Memory API supports viewing a `MemorySegment` as a `ByteBuffer`, an instance of which can then be passed to the vector load/store access methods.
>
> Such `ByteBuffer` access requires accesses are scoped (a method annotated with `ScopedMemoryAccess.Scoped`) and the `ByteBuffer`'s scope (instance of `ScopedMemoryAccess.Scope`) checked for validity. Thereby ensuring exceptional failure if the underlying segment is shared and is closed.
>
> All Vector tests pass on linux-x64, linux-aarch64, macosx-x64, and windows-x64.
Changes look good - thanks for taking the time to centralize the various vector operations inside ScopedMemoryAccess.
-------------
Marked as reviewed by mcimadamore (Reviewer).
PR: https://git.openjdk.java.net/jdk17/pull/129
More information about the core-libs-dev
mailing list