RFR: 8340307: Add explanation around MemorySegment:reinterpret regarding arenas [v5]

Jorn Vernee jvernee at openjdk.org
Mon Nov 4 11:17:29 UTC 2024


On Fri, 1 Nov 2024 09:11:43 GMT, Per Minborg <pminborg at openjdk.org> wrote:

>> This PR proposes to add a small text segment on the `MemorySegment::reinterpret` overloads that takes an Arena stating the responsibility of actually freeing reinterpreted segments lies with the *original* arena.
>
> Per Minborg has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Reword reinterpret docs

Marked as reviewed by jvernee (Reviewer).

src/java.base/share/classes/java/lang/foreign/MemorySegment.java line 819:

> 817:      * that is, if the provided arena is a {@linkplain Arena#ofConfined() confined arena},
> 818:      * the returned segment can only be accessed by the arena's owner thread, regardless
> 819:      * of the confinement restrictions associated with this segment.In other words, this

Suggestion:

     * of the confinement restrictions associated with this segment. In other words, this

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

PR Review: https://git.openjdk.org/jdk/pull/21761#pullrequestreview-2412793690
PR Review Comment: https://git.openjdk.org/jdk/pull/21761#discussion_r1827568119


More information about the core-libs-dev mailing list