Unifying memory addresses and memory segments
maurizio.cimadamore at oracle.com
Tue Jul 19 14:05:10 UTC 2022
The Java 19 Foreign Function and Memory API (FFM API) uses zero-length
memory segments to encode pointers that are temporally safe (this
replaces the NativeSymbol abstraction that was available in Java 18).
It turns out that there's more to this approach than meets the eye, as
memory segments can (with few tweaks) be used as a replacement for
memory address everywhere in the FFM API, which leads to a simpler and
more symmetric API.
We have captured our findings in the following document:
More information about the panama-dev