Uses of Interface
jdk.incubator.foreign.MemoryAddress
Packages that use MemoryAddress
Package
Description
Classes to support low-level and efficient foreign memory/function access, directly from Java.
-
Uses of MemoryAddress in jdk.incubator.foreign
Fields in jdk.incubator.foreign declared as MemoryAddressModifier and TypeFieldDescriptionstatic MemoryAddressMemoryAddress.NULLThe off-heap memory address instance modelling theNULLaddress.Methods in jdk.incubator.foreign that return MemoryAddressModifier and TypeMethodDescriptionMemoryAddress.addOffset(long offset)Creates a new memory address with given offset (in bytes), which might be negative, from current one.Addressable.address()Map this object into aMemoryAddressinstance.CLinker.VaList.address()Returns the memory address of the Cva_listassociated with this instance.LibraryLookup.Symbol.address()The memory address of this lookup symbol.default MemoryAddressMemoryAddress.address()MemorySegment.address()The base memory address associated with this memory segment.static MemoryAddressCLinker.allocateMemoryRestricted(long size)Allocates memory of given size using malloc.static MemoryAddressMemoryAccess.getAddress(MemorySegment segment)Reads a memory address from given segment, with byte order set toByteOrder.nativeOrder().static MemoryAddressMemoryAccess.getAddressAtIndex(MemorySegment segment, long index)Reads a memory address from given segment and element index, with byte order set toByteOrder.nativeOrder().static MemoryAddressMemoryAccess.getAddressAtOffset(MemorySegment segment, long offset)Reads a memory address from given segment and offset, with byte order set toByteOrder.nativeOrder().static MemoryAddressMemoryAddress.ofLong(long value)Obtain an off-heap memory address instance from given long address.CLinker.VaList.vargAsAddress(MemoryLayout layout)Reads the next value as aMemoryAddressand advances this va list's position.Methods in jdk.incubator.foreign with parameters of type MemoryAddressModifier and TypeMethodDescriptiondefault MemorySegmentMemorySegment.asSlice(MemoryAddress newBase)Obtains a new memory segment view whose base address is the given address, and whose new size is computed by subtracting the address offset relative to this segment (seesegmentOffset(MemorySegment)) from this segment size.default MemorySegmentMemorySegment.asSlice(MemoryAddress newBase, long newSize)Obtains a new memory segment view whose base address is the given address, and whose new size is specified by the given argument.static voidCLinker.freeMemoryRestricted(MemoryAddress addr)Frees the memory pointed by the given memory address.static CLinker.VaListCLinker.VaList.ofAddressRestricted(MemoryAddress address)Constructs a newVaListinstance out of a memory address pointing to an existing Cva_list.static StringCLinker.toJavaStringRestricted(MemoryAddress addr)Converts a null-terminated C string stored at given address into a Java string, using the platform's default charset.static StringCLinker.toJavaStringRestricted(MemoryAddress addr, Charset charset)Converts a null-terminated C string stored at given address into a Java string, using the givencharset.