[foreign-preview] RFR: 8281855: Rename ResourceScope to MemorySession
Maurizio Cimadamore
mcimadamore at openjdk.java.net
Fri Feb 18 11:03:13 UTC 2022
On Fri, 18 Feb 2022 10:51:49 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
> hat option was also considered, but discarded because it would make `SegmentAllocator` stateful, e.g. more complex than just a functional interface.
Note that today there is no contract which says that all segments returned by a `SegmentAllocator` must have the same session. While some allocators might behave like that, I think it would not be ok to force that behavior on _all_ allocators. And, we considered to add, perhaps in the future, some small subinterface, like `ScopedSegmentAllocator` which also has a `session` accessor - this would be a good return type for the arena allocator methods, for instance. But this is a move that is orthogonal to the changes described in this PR (and also not a binding one - we can add the sub-interface even at a later point w/o breaking compatibility).
-------------
PR: https://git.openjdk.java.net/panama-foreign/pull/641
More information about the panama-dev
mailing list