RFR: 8329997: Add provisions for checking memory segment alignment constraints [v2]
Per Minborg
pminborg at openjdk.org
Mon Apr 15 13:07:43 UTC 2024
On Mon, 15 Apr 2024 10:07:31 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> Per Minborg has updated the pull request incrementally with three additional commits since the last revision:
>>
>> - Update src/java.base/share/classes/jdk/internal/foreign/HeapMemorySegmentImpl.java
>>
>> Co-authored-by: Jorn Vernee <JornVernee at users.noreply.github.com>
>> - Update src/java.base/share/classes/jdk/internal/foreign/NativeMemorySegmentImpl.java
>>
>> Co-authored-by: Jorn Vernee <JornVernee at users.noreply.github.com>
>> - Update src/java.base/share/classes/java/lang/foreign/MemorySegment.java
>>
>> Co-authored-by: Maurizio Cimadamore <54672762+mcimadamore at users.noreply.github.com>
>
> src/java.base/share/classes/java/lang/foreign/MemorySegment.java line 615:
>
>> 613: * the requested byte alignment during native segment allocation)}
>> 614: * <p>
>> 615: * The returned alignment is always an even power of two and is derived from:
>
> Not sure about the "even". Surely 2^3 is a valid max alignment?
The meaning of "even" here is that it is a number 2^n, n >= 0, n ∈ Z. But maybe "a power of two" is enough.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18779#discussion_r1565762747
More information about the core-libs-dev
mailing list