[foreign-memaccess+abi] RFR: 8296417: Make memory session a pure lifetime abstraction [v6]
Maurizio Cimadamore
mcimadamore at openjdk.org
Mon Nov 7 09:54:47 UTC 2022
On Mon, 7 Nov 2022 09:22:24 GMT, Per Minborg <pminborg at openjdk.org> wrote:
>> Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Fix SegmentAllocator.slicingAllocator to throw IIOBE
>
> src/java.base/share/classes/java/lang/foreign/MemorySegment.java line 1242:
>
>> 1240: */
>> 1241: static MemorySegment allocateNative(long byteSize, long byteAlignment, MemorySession session) {
>> 1242: Objects.requireNonNull(session);
>
> Swap checking order
Some of our tests (TestNulls) rely on nulls being checked first. I'm ok with swapping when there are two null checks (as in `allocateNative(MemoryLayout, MemorySession)`).
-------------
PR: https://git.openjdk.org/panama-foreign/pull/750
More information about the panama-dev
mailing list