[foreign-memaccess] [Rev 01] 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 20:59:27 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

Jorn Vernee has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev
excludes the unrelated changes brought in by the merge/rebase. The pull request contains one additional commit since
the last revision:

  Slice allocated segments when alignedSize != byteSize (since alignedSize != buf might be false accidentally)

-------------

Changes:
  - all: https://git.openjdk.java.net/panama-foreign/pull/136/files
  - new: https://git.openjdk.java.net/panama-foreign/pull/136/files/e9d9a2d4..16b2df70

Webrevs:
 - full: https://webrevs.openjdk.java.net/panama-foreign/136/webrev.01
 - incr: https://webrevs.openjdk.java.net/panama-foreign/136/webrev.00-01

  Stats: 8 lines in 2 files changed: 6 ins; 0 del; 2 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