[foreign-memaccess+abi] RFR: 8263018: Improve API for lifecycle of native resources [v10]
Maurizio Cimadamore
mcimadamore at openjdk.java.net
Fri Mar 12 11:16:38 UTC 2021
On Thu, 11 Mar 2021 23:31:54 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:
>> Maurizio Cimadamore has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - Remove spurious println
>> - Clarify javadoc for SegmentAllocator::arenaUnbounded
>
> src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/MemoryAddress.java line 111:
>
>> 109: * @param bytesSize the desired size.
>> 110: * @return a new native memory segment with given base address and size.
>> 111: * @throws IllegalArgumentException if {@code bytesSize <= 0}.
>
> `<= 0` or `< 0` ? The latter is specified by `MemorySegment.allocateNative`, but i think the implementation behaves like the former?
should be <= 0 everywhere (including for alignment) - good catch
-------------
PR: https://git.openjdk.java.net/panama-foreign/pull/466
More information about the panama-dev
mailing list