RFR: 8295044: Implementation of Foreign Function and Memory API (Second Preview) [v8]

Alan Bateman alanb at openjdk.org
Tue Nov 8 11:27:03 UTC 2022


On Tue, 8 Nov 2022 10:42:13 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> This PR contains the API and implementation changes for JEP-434 [1]. A more detailed description of such changes, to avoid repetitions during the review process, is included as a separate comment.
>> 
>> [1] - https://openjdk.org/jeps/434
>
> Maurizio Cimadamore has updated the pull request incrementally with three additional commits since the last revision:
> 
>  - Fix bad indent on ModuleLayer.Controller
>  - Update src/java.base/share/classes/java/lang/foreign/package-info.java
>    
>    Co-authored-by: Paul Sandoz <paul.d.sandoz at googlemail.com>
>  - Update src/java.base/share/classes/java/lang/foreign/ValueLayout.java
>    
>    Co-authored-by: Paul Sandoz <paul.d.sandoz at googlemail.com>

src/java.base/share/classes/java/lang/foreign/Arena.java line 34:

> 32:  * An arena allocates and manages the lifecycle of native segments.
> 33:  * <p>
> 34:  * An arena is a {@linkplain AutoCloseable closeable} segment allocator that has a {@link #session() memory session}.

Should this is link MemorySession or linkplan memory session ?

src/java.base/share/classes/java/lang/foreign/Arena.java line 98:

> 96:      * that memory session are also released.
> 97:      * @throws IllegalStateException if the session associated with this arena is not {@linkplain MemorySession#isAlive() alive}.
> 98:      * @throws WrongThreadException if this method is called from a thread other than the thread

Should this be qualified to say that when the session is confined, and thread is called from a thread other than the owner?

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

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


More information about the hotspot-dev mailing list