Details
-
Enhancement
-
Resolution: Fixed
-
P3
-
repo-panama
Description
MemorySegment::allocateNative throws IllegalArgumentException if its size parameter is <= 0. This seems to be inconsistent with the fact that Unsafe::allocate/freeMemory seems to be tolerant of that, and that you can still create zero-sized segments from e.g. direct buffers (or Java arrays).
This is discussed in more details here:
https://mail.openjdk.java.net/pipermail/panama-dev/2022-January/016071.html
This is discussed in more details here:
https://mail.openjdk.java.net/pipermail/panama-dev/2022-January/016071.html