public interface jdk.incubator.foreign.MemorySegment extends java.lang.AutoCloseable
minor version: 0
major version: 59
flags: flags: (0x0601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT
this_class: jdk.incubator.foreign.MemorySegment
super_class: java.lang.Object
{
public abstract jdk.incubator.foreign.MemoryAddress baseAddress();
descriptor: ()Ljdk/incubator/foreign/MemoryAddress;
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
public abstract jdk.incubator.foreign.MemorySegment acquire();
descriptor: ()Ljdk/incubator/foreign/MemorySegment;
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
public abstract java.lang.Thread ownerThread();
descriptor: ()Ljava/lang/Thread;
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
public abstract long byteSize();
descriptor: ()J
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
public abstract jdk.incubator.foreign.MemorySegment asReadOnly();
descriptor: ()Ljdk/incubator/foreign/MemorySegment;
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
public abstract jdk.incubator.foreign.MemorySegment asSlice(long, long);
descriptor: (JJ)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
MethodParameters:
Name Flags
offset
newSize
public abstract boolean isAlive();
descriptor: ()Z
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
public abstract boolean isReadOnly();
descriptor: ()Z
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
public abstract void close();
descriptor: ()V
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
public abstract java.nio.ByteBuffer asByteBuffer();
descriptor: ()Ljava/nio/ByteBuffer;
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
public abstract byte[] toByteArray();
descriptor: ()[B
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
public static jdk.incubator.foreign.MemorySegment ofByteBuffer(java.nio.ByteBuffer);
descriptor: (Ljava/nio/ByteBuffer;)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokestatic jdk.internal.foreign.Utils.makeBufferSegment:(Ljava/nio/ByteBuffer;)Ljdk/incubator/foreign/MemorySegment;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 bb Ljava/nio/ByteBuffer;
MethodParameters:
Name Flags
bb
public static jdk.incubator.foreign.MemorySegment ofArray(byte[]);
descriptor: ([B)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokestatic jdk.internal.foreign.Utils.makeArraySegment:([B)Ljdk/incubator/foreign/MemorySegment;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 arr [B
MethodParameters:
Name Flags
arr
public static jdk.incubator.foreign.MemorySegment ofArray(char[]);
descriptor: ([C)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokestatic jdk.internal.foreign.Utils.makeArraySegment:([C)Ljdk/incubator/foreign/MemorySegment;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 arr [C
MethodParameters:
Name Flags
arr
public static jdk.incubator.foreign.MemorySegment ofArray(short[]);
descriptor: ([S)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokestatic jdk.internal.foreign.Utils.makeArraySegment:([S)Ljdk/incubator/foreign/MemorySegment;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 arr [S
MethodParameters:
Name Flags
arr
public static jdk.incubator.foreign.MemorySegment ofArray(int[]);
descriptor: ([I)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokestatic jdk.internal.foreign.Utils.makeArraySegment:([I)Ljdk/incubator/foreign/MemorySegment;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 arr [I
MethodParameters:
Name Flags
arr
public static jdk.incubator.foreign.MemorySegment ofArray(float[]);
descriptor: ([F)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokestatic jdk.internal.foreign.Utils.makeArraySegment:([F)Ljdk/incubator/foreign/MemorySegment;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 arr [F
MethodParameters:
Name Flags
arr
public static jdk.incubator.foreign.MemorySegment ofArray(long[]);
descriptor: ([J)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokestatic jdk.internal.foreign.Utils.makeArraySegment:([J)Ljdk/incubator/foreign/MemorySegment;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 arr [J
MethodParameters:
Name Flags
arr
public static jdk.incubator.foreign.MemorySegment ofArray(double[]);
descriptor: ([D)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokestatic jdk.internal.foreign.Utils.makeArraySegment:([D)Ljdk/incubator/foreign/MemorySegment;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 arr [D
MethodParameters:
Name Flags
arr
public static jdk.incubator.foreign.MemorySegment allocateNative(jdk.incubator.foreign.MemoryLayout);
descriptor: (Ljdk/incubator/foreign/MemoryLayout;)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=1, args_size=1
start local 0 0: aload 0
invokeinterface jdk.incubator.foreign.MemoryLayout.byteSize:()J
aload 0
invokeinterface jdk.incubator.foreign.MemoryLayout.byteAlignment:()J
invokestatic jdk.incubator.foreign.MemorySegment.allocateNative:(JJ)Ljdk/incubator/foreign/MemorySegment;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 layout Ljdk/incubator/foreign/MemoryLayout;
MethodParameters:
Name Flags
layout
public static jdk.incubator.foreign.MemorySegment allocateNative(long);
descriptor: (J)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=2, args_size=1
start local 0 0: lload 0
lconst_1
invokestatic jdk.incubator.foreign.MemorySegment.allocateNative:(JJ)Ljdk/incubator/foreign/MemorySegment;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 bytesSize J
MethodParameters:
Name Flags
bytesSize
public static jdk.incubator.foreign.MemorySegment mapFromPath(java.nio.file.Path, long, java.nio.channels.FileChannel$MapMode);
descriptor: (Ljava/nio/file/Path;JLjava/nio/channels/FileChannel$MapMode;)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=4, args_size=3
start local 0 start local 1 start local 3 0: aload 0
lload 1
aload 3
invokestatic jdk.internal.foreign.Utils.makeMappedSegment:(Ljava/nio/file/Path;JLjava/nio/channels/FileChannel$MapMode;)Ljdk/incubator/foreign/MemorySegment;
areturn
end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 path Ljava/nio/file/Path;
0 1 1 bytesSize J
0 1 3 mapMode Ljava/nio/channels/FileChannel$MapMode;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
path
bytesSize
mapMode
public static jdk.incubator.foreign.MemorySegment allocateNative(long, long);
descriptor: (JJ)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=6, locals=4, args_size=2
start local 0 start local 2 0: lload 0
lconst_0
lcmp
ifgt 2
1: new java.lang.IllegalArgumentException
dup
new java.lang.StringBuilder
dup
ldc "Invalid allocation size : "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
lload 0
invokevirtual java.lang.StringBuilder.append:(J)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
lload 2
lconst_0
lcmp
iflt 4
3: lload 2
lload 2
lconst_1
lsub
land
lconst_0
lcmp
ifeq 5
4: StackMap locals:
StackMap stack:
new java.lang.IllegalArgumentException
dup
new java.lang.StringBuilder
dup
ldc "Invalid alignment constraint : "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
lload 2
invokevirtual java.lang.StringBuilder.append:(J)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
5: StackMap locals:
StackMap stack:
lload 0
lload 2
invokestatic jdk.internal.foreign.Utils.makeNativeSegment:(JJ)Ljdk/incubator/foreign/MemorySegment;
areturn
end local 2 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 bytesSize J
0 6 2 alignmentBytes J
MethodParameters:
Name Flags
bytesSize
alignmentBytes
}
SourceFile: "MemorySegment.java"
InnerClasses:
public MapMode = java.nio.channels.FileChannel$MapMode of java.nio.channels.FileChannel