[foreign-memaccess] RFR 8224483: Split MemoryAddress into separate address/region abstractions
Maurizio Cimadamore
maurizio.cimadamore at oracle.com
Tue May 21 11:52:38 UTC 2019
Following discussion at [1], I decided to go ahead and split
MemoryAddres into two abstractions:
* MemroyAddress will now embody an offest into a...
* MemorySegment, which represent a contiguous region of memory
The name MemorySegment came from an internal discussion with Brian,
where he pointed out that MemoryScope and MemoryRegion where a bit too
overlapping, in the english sense of the word. MemorySegment suggests
something that has lower/upper boundaries.
Webrev:
http://cr.openjdk.java.net/~mcimadamore/panama/8224483/
There are many changes since the last patch discussed - mostly because,
as I was adding the lower-level allocate methods in MemoryScope I
realized that we were missing a lot of checks (w.r.t. alignment and
sizes). I've added those and added tests for these as well (2 new tests
have been added). Also, the Scope::allocate API should reflect the fact
that Unsafe might fail to allocate - again added a test for this.
Maurizio
More information about the panama-dev
mailing list