RFR: 8275063: Implementation of Foreign Function & Memory API (Second incubator) [v12]

Maurizio Cimadamore mcimadamore at openjdk.java.net
Tue Nov 2 18:52:21 UTC 2021


On Tue, 2 Nov 2021 16:51:06 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

>> Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Tweak javadoc of loaderLookup
>
> src/jdk.incubator.foreign/share/classes/jdk/internal/foreign/ArenaAllocator.java line 88:
> 
>> 86:                     if (size > arenaSize) {
>> 87:                         throw new OutOfMemoryError();
>> 88:                     }
> 
> Isn't this already covered by the `finally` block? Also, this seems to be checking the unaltered `size`, which I think should have been already done at the end of the previous `allocate` call right?

I'll have to think some more about this. I don't think this is covered inside the block - that is, the block tries to allocate, and then in the finally we throw if we realized we've allocated too much.

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

PR: https://git.openjdk.java.net/jdk/pull/5907



More information about the build-dev mailing list