RFR: 8333884: MemorySegment::reinterpret removes read-only property [v4]

Per Minborg pminborg at openjdk.org
Fri Jul 5 14:01:59 UTC 2024


> This PR proposes to retain the read-only state when any of the `MemorySegment::reinterpret` methods is called.
> 
> Previously, the read-only state was lost and the returned `MemorySegment` was always writable regardless of the original segment's read-only state.

Per Minborg has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains four commits:

 - Merge master
 - Add read-only comment on asSegment too
 - Rework docs
 - Make reinterpret retain read-only state

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

Changes: https://git.openjdk.org/jdk/pull/19629/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19629&range=03
  Stats: 38 lines in 4 files changed: 30 ins; 1 del; 7 mod
  Patch: https://git.openjdk.org/jdk/pull/19629.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/19629/head:pull/19629

PR: https://git.openjdk.org/jdk/pull/19629


More information about the core-libs-dev mailing list