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

Maurizio Cimadamore mcimadamore at openjdk.org
Wed Nov 9 16:47:23 UTC 2022


On Wed, 9 Nov 2022 14:47:41 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:

> My view is that an `Arena` is the temporal abstraction of memory, as it can create and free memory. On the other hand, a `MemorySession` is merely a view on its owning `Arena`, allowing queries of the arena's status. An implicit session can be understood as a session that has an implicit `Arena`.

Some sessions are associated with arenas, some are not (global and implicit). In my mental model, the current session is more of an access control bit on the side of a memory segment, which is consulted prior to a memory access operation.

So, IMHO the real issue here is (1) the fact that coming from a world where there's only MemorySession this new shift seems surprising and (2), a toplevel MemorySession abstraction is probably attracting more attention than it should at this point. But these seem things that could be addressed with some naming/javadoc changes.

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

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


More information about the panama-dev mailing list