RFR: 8287788: Implement a better allocator for downcalls [v9]
Maurizio Cimadamore
mcimadamore at openjdk.org
Thu Jan 23 12:32:49 UTC 2025
On Wed, 22 Jan 2025 12:27:10 GMT, Matthias Ernst <duke at openjdk.org> wrote:
>> src/java.base/share/classes/jdk/internal/foreign/abi/BufferStack.java line 52:
>>
>>> 50: scope.close();
>>> 51: offset = parentOffset;
>>> 52: lock.unlock();
>>
>> I believe you could have mismatched lock/unlock in some cases
>
> Which scenario?
Apologies - that looks correct because:
* we always lock on reserve, then
* if there's no space, we unlock and return
* if there's space we return a new Frame (which then unlock on close)
* if we fail to lock, then we return a normal arena (and there's nothing to unlock)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23142#discussion_r1926902590
More information about the core-libs-dev
mailing list