[foreign-memaccess] RFR: 8247924: Improve javadoc of Foreign Memory Access API (part one) [v2]

Paul Sandoz psandoz at openjdk.java.net
Fri Jun 19 21:15:45 UTC 2020


On Fri, 19 Jun 2020 13:52:29 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> This patch clarifies the role of `MemorySegment::close`, and also mentions the fact that external memory sources
>> (arrays/buffers) can be aliased, and that extra care must be taken by clients wanting to share such segments.
>> I also fixed the typos in restricted methods which we also fixed in foreign-abi.
>
> Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Update src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/MemorySegment.java
>   
>   Co-authored-by: Jorn Vernee <JornVernee at users.noreply.github.com>

src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/MemorySegment.java line 623:

> 622:      * <p>
> 623:      * This method is <em>restricted</em>. Restricted method are unsafe, and, if used incorrectly, their use might
> crash 624:      * the JVM or, worse, silently result in memory corruption. Thus, clients should refrain from depending
> on

s/Restricted method/Restricted methods/

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

PR: https://git.openjdk.java.net/panama-foreign/pull/209


More information about the panama-dev mailing list