[foreign-memaccess+abi] RFR: 8296417: Make memory session a pure lifetime abstraction [v2]

Radoslaw Smogura duke at openjdk.org
Fri Nov 4 18:32:06 UTC 2022


On Fri, 4 Nov 2022 18:30:28 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> Add description
>
> Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Tweak javadoc for VaList

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

> 57:  */
> 58: @PreviewFeature(feature=PreviewFeature.Feature.FOREIGN)
> 59: public sealed interface Arena extends SegmentAllocator, AutoCloseable permits ArenaImpl { //@@@: This can also be non-sealed!

I wonder if this have to be sealed? Having this unsealed would allow creating custom arenas.

(I see that this comment is already in code)

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

> 68:      * longer in use. Failure to do so will result in off-heap memory leaks.
> 69:      * <p>
> 70:      * This is equivalent to the following code:

If we would allow creating custom arenas than this statement may not be true (ie. of pooling arena)

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

PR: https://git.openjdk.org/panama-foreign/pull/750


More information about the panama-dev mailing list