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

Alan Bateman alanb at openjdk.org
Wed Nov 9 12:05:35 UTC 2022


On Tue, 8 Nov 2022 22:12:46 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 one additional commit since the last revision:
> 
>   Fix typo

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

> 123:      */
> 124:     @Override
> 125:     void close();

I'm trying to understand how close interacts with whileAlive on its memory session. Does close throw or block when there is a critical action running? The javadoc doesn't say right now.

src/java.base/share/classes/java/lang/foreign/MemorySession.java line 43:

> 41:  * <p>
> 42:  * Conversely, a bounded memory session has a start and an end. Bounded memory sessions can be managed either
> 43:  * explicitly, (i.e. using an {@linkplain Arena arena}) or implicitly, by the garbage collector. When a bounded memory

A minor style thing here is that this should probably be "using an {@link Arena}" as you really mean the Arena. This helps a bit with the generate docs as it shows up currently as "arenaPREVIEW", if you see what I mean.

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

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


More information about the serviceability-dev mailing list