mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
Merge
This commit is contained in:
commit
86dc760f9e
29 changed files with 750 additions and 209 deletions
|
@ -285,9 +285,11 @@ public interface SegmentAllocator {
|
|||
Objects.requireNonNull(array);
|
||||
Objects.requireNonNull(elementLayout);
|
||||
int size = Array.getLength(array);
|
||||
MemorySegment addr = allocate(MemoryLayout.sequenceLayout(size, elementLayout));
|
||||
MemorySegment.copy(heapSegmentFactory.apply(array), elementLayout, 0,
|
||||
addr, elementLayout.withOrder(ByteOrder.nativeOrder()), 0, size);
|
||||
MemorySegment addr = allocateArray(elementLayout, size);
|
||||
if (size > 0) {
|
||||
MemorySegment.copy(heapSegmentFactory.apply(array), elementLayout, 0,
|
||||
addr, elementLayout.withOrder(ByteOrder.nativeOrder()), 0, size);
|
||||
}
|
||||
return addr;
|
||||
}
|
||||
|
||||
|
|
|
@ -3654,7 +3654,7 @@ public final class Files {
|
|||
* if {@code options} contains an invalid combination of options
|
||||
* @throws IOException
|
||||
* if an I/O error occurs writing to or creating the file, or the
|
||||
* text cannot be encoded using the specified charset
|
||||
* text cannot be encoded using UTF-8
|
||||
* @throws UnsupportedOperationException
|
||||
* if an unsupported option is specified
|
||||
* @throws SecurityException
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue