On Tue, 2 Nov 2021 16:51:06 GMT, Jorn Vernee <jver...@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

Reply via email to