-
Bug
-
Resolution: Fixed
-
P3
-
None
-
repo-panama
As described here:
https://mail.openjdk.java.net/pipermail/panama-dev/2021-September/014946.html
There are few areas in the foreign memory access and foreign linker API that are in need of improvements:
* dereference: there is a mismatch between API points which create segments (which take a layout) and dereference API points, which do not take layouts
* role of memory address: in Java 17, MemoryAddress has become a stateful carrier, which is attached to a scope. This is inconvienient, as in most cases, a memory address is just a raw pointer that arises when interacting with native code.
* resource scopes: the API for scopes has too many flavors to pick from, many of which overlap. The fact that scopes and segment allocators are unrelated forces clients to introduce ad hoc conversions from scopes to allocators, and library developers to add overloads. Finally, the API for acquiring scopes doesn't work well with try-with-resources, and could also be simplified.
https://mail.openjdk.java.net/pipermail/panama-dev/2021-September/014946.html
There are few areas in the foreign memory access and foreign linker API that are in need of improvements:
* dereference: there is a mismatch between API points which create segments (which take a layout) and dereference API points, which do not take layouts
* role of memory address: in Java 17, MemoryAddress has become a stateful carrier, which is attached to a scope. This is inconvienient, as in most cases, a memory address is just a raw pointer that arises when interacting with native code.
* resource scopes: the API for scopes has too many flavors to pick from, many of which overlap. The fact that scopes and segment allocators are unrelated forces clients to introduce ad hoc conversions from scopes to allocators, and library developers to add overloads. Finally, the API for acquiring scopes doesn't work well with try-with-resources, and could also be simplified.
- duplicates
-
JDK-8270376 Finalize API for memory copy
-
- Closed
-
- relates to
-
JDK-8274155 Foreign API refresh - jextract update
-
- Resolved
-