[foreign-memaccess+abi] RFR: Improve performance of Arena::allocateFrom [v2]

Maurizio Cimadamore mcimadamore at openjdk.org
Tue Aug 15 12:09:03 UTC 2023


On Sat, 5 Aug 2023 13:40:34 GMT, ExE Boss <duke at openjdk.org> wrote:

>> Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fix segment allocator test
>
> src/java.base/share/classes/jdk/internal/foreign/NativeMemorySegmentImpl.java line 157:
> 
>> 155:             return UNSAFE.allocateMemory(size);
>> 156:         } catch (IllegalArgumentException ex) {
>> 157:             throw new OutOfMemoryError();
> 
> Maybe include the cause?
> Suggestion:
> 
>             throw new OutOfMemoryError(ex);

OutOfMemoryError doesn't have a constructor that takes an exception. I'll leave it as is for the time being.

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

PR Review Comment: https://git.openjdk.org/panama-foreign/pull/855#discussion_r1294507522


More information about the panama-dev mailing list