RFR: 8317819: Scope should reflect lifetime of underying resource (mainline) [v4]
Maurizio Cimadamore
mcimadamore at openjdk.org
Fri Oct 20 10:26:53 UTC 2023
> This PR is based on a port of: openjdk/panama-foreign#898
>
> Some additional changes are contained in this PR:
>
> * instead of using a different "always alive" scope for zero-length memory segments, we now use the global scope
> * the javadoc for `MemorySegment::ofArray`, `MemorySegment::ofBuffer` and `SymbolLookup::loaderLookup` is tweaked to say that the scope associated to the returned segments is an automatic scope
> * the javadoc for `MemorySegment.Scope` defines the concepts of global and automatic scope, which are then referenced in the `Arena` javadoc.
Maurizio Cimadamore has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains five commits:
- Add newline at the end of test
- Merge branch 'master' into better_scope_doc
- Address review comments
- Add test
- Initial push
-------------
Changes: https://git.openjdk.org/jdk/pull/16183/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16183&range=03
Stats: 269 lines in 12 files changed: 205 ins; 15 del; 49 mod
Patch: https://git.openjdk.org/jdk/pull/16183.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/16183/head:pull/16183
PR: https://git.openjdk.org/jdk/pull/16183
More information about the core-libs-dev
mailing list