[foreign-jextract] RFR: 8244128: Allocations larger than MAX_ALIGN can fail to be sliced to proper size.
Jorn Vernee
jvernee at openjdk.java.net
Wed Apr 29 18:36:15 UTC 2020
Hi,
This patch fixes a problem where the MemorySegment resulting from an allocation was not always sliced to the requested
size, when the allocation code was manually up-sizing the allocation in order to perform manual alignment of the
returned MemorySegment, but the initial allocation turned out to be aligned any ways.
Thanks,
Jorn
-------------
Commit messages:
- Slice allocated segments when alignedSize != byteSize (since alignedSize != buf might be false accidentally)
Changes: https://git.openjdk.java.net/panama-foreign/pull/136/files
Webrev: https://webrevs.openjdk.java.net/panama-foreign/136/webrev.00
Issue: https://bugs.openjdk.java.net/browse/JDK-8244128
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
Patch: https://git.openjdk.java.net/panama-foreign/pull/136.diff
Fetch: git fetch https://git.openjdk.java.net/panama-foreign pull/136/head:pull/136
PR: https://git.openjdk.java.net/panama-foreign/pull/136
More information about the panama-dev
mailing list