[foreign-memaccess+abi] RFR: 8296417: Make memory session a pure lifetime abstraction [v6]

Per Minborg pminborg at openjdk.org
Mon Nov 7 09:27:08 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

src/java.base/share/classes/java/lang/foreign/SegmentAllocator.java line 354:

> 352:      * <p>
> 353:      * When the returned allocator cannot satisfy an allocation request, e.g. because a slice of the provided
> 354:      * segment with the requested size cannot be found, an {@link IndexOutOfBoundsException} is thrown.

This type of exception appears a bit strange to me.

-------------

PR: https://git.openjdk.org/panama-foreign/pull/750


More information about the panama-dev mailing list