On Wed, 23 Jun 2021 19:10:41 GMT, Paul Sandoz <psan...@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. This pull request has now been integrated. Changeset: 63bcd333 Author: Paul Sandoz <psan...@openjdk.org> URL: https://git.openjdk.java.net/jdk17/commit/63bcd3336ecf77a8d256b243c13165397fc8e5bb Stats: 455 lines in 42 files changed: 186 ins; 95 del; 174 mod 8269246: Scoped ByteBuffer vector access Reviewed-by: mcimadamore ------------- PR: https://git.openjdk.java.net/jdk17/pull/129