[foreign-memaccess+abi] RFR: 8296417: Make memory session a pure lifetime abstraction [v6]
Jorn Vernee
jvernee at openjdk.org
Fri Nov 4 23:58:54 UTC 2022
On Fri, 4 Nov 2022 23:20:17 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> Add description
>
> Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision:
>
> Fix SegmentAllocator.slicingAllocator to throw IIOBE
test/micro/org/openjdk/bench/java/lang/foreign/StrLenTest.java line 162:
> 160: }
> 161: MemorySegment res = current.allocate(byteSize, byteAlignment);
> 162: rem -= segment.segmentOffset(res);
I think this should be `rem = segment.byteSize() - segment.segmentOffset(res);` right? Otherwise more and more is subtracted on subsequent allocations.
-------------
PR: https://git.openjdk.org/panama-foreign/pull/750
More information about the panama-dev
mailing list