Uses of Interface
java.lang.foreign.AddressLayout
Package
Description
Provides low-level access to memory and functions outside the Java runtime.
-
Uses of AddressLayoutPREVIEW in java.lang.foreign
Modifier and TypeFieldDescriptionstatic final AddressLayoutPREVIEW
ValueLayout.ADDRESS
An address layout constant whose size is the same as that of a machine address (size_t
), byte alignment set tosizeof(size_t)
, byte order set toByteOrder.nativeOrder()
.static final AddressLayoutPREVIEW
ValueLayout.ADDRESS_UNALIGNED
An unaligned address layout constant whose size is the same as that of a machine address (size_t
), and byte order set toByteOrder.nativeOrder()
.Modifier and TypeMethodDescriptionAddressLayout.withByteAlignment
(long byteAlignment) Returns a memory layout with the same characteristics as this layout, but with the given alignment constraint (in bytes).Returns a memory layout with the same characteristics as this layout, but with the given name.Returns a value layout with the same characteristics as this layout, but with the given byte order.AddressLayout.withoutName()
Returns a memory layout with the same characteristics as this layout, but with no name.AddressLayout.withoutTargetLayout()
Returns an address layout with the same carrier, alignment constraint, name and order as this address layout, but with no target layout.AddressLayout.withTargetLayout
(MemoryLayoutPREVIEW layout) Returns an address layout with the same carrier, alignment constraint, name and order as this address layout, but associated with the specified target layout.Modifier and TypeMethodDescriptiondefault MemorySegmentPREVIEW
SegmentAllocator.allocate
(AddressLayoutPREVIEW layout, MemorySegmentPREVIEW value) Allocates a memory segment with the given layout and initializes it with the given address value.default MemorySegmentPREVIEW
MemorySegment.get
(AddressLayoutPREVIEW layout, long offset) Reads an address from this segment at the given offset, with the given layout.default MemorySegmentPREVIEW
MemorySegment.getAtIndex
(AddressLayoutPREVIEW layout, long index) Reads an address from this segment at the given at the given index, scaled by the given layout size.default void
MemorySegment.set
(AddressLayoutPREVIEW layout, long offset, MemorySegmentPREVIEW value) Writes an address into this segment at the given offset, with the given layout.default void
MemorySegment.setAtIndex
(AddressLayoutPREVIEW layout, long index, MemorySegmentPREVIEW value) Writes an address into this segment at the given index, scaled by the given layout size.