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 final MemoryAddressMemoryAddress.NULLThe native memory address instance modelling theNULLaddress, associated with the global resource scope.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.default MemoryAddressMemoryAddress.address()MemorySegment.address()The base memory address associated with this memory segment.static MemoryAddressCLinker.allocateMemory(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 a native memory address instance from given long address.CLinker.upcallStub(MethodHandle target, FunctionDescriptor function, ResourceScope scope) Allocates a native stub with given scope which can be passed to other foreign functions (as a function pointer); calling such a function pointer from native code will result in the execution of the provided method handle.CLinker.VaList.vargAsAddress(MemoryLayout layout) Reads the next value as aMemoryAddressand advances this va list's position.Methods in jdk.incubator.foreign that return types with arguments of type MemoryAddressModifier and TypeMethodDescriptionLooks up a symbol with given name in this lookup.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.freeMemory(MemoryAddress addr) Frees the memory pointed by the given memory address.static CLinker.VaListCLinker.VaList.ofAddress(MemoryAddress address) Constructs a newVaListinstance out of a memory address pointing to an existing Cva_list, backed by the global resource scope.static CLinker.VaListCLinker.VaList.ofAddress(MemoryAddress address, ResourceScope scope) Constructs a newVaListinstance out of a memory address pointing to an existing Cva_list, with given resource scope.static StringCLinker.toJavaString(MemoryAddress addr) Converts a UTF-8 encoded, null-terminated C string stored at given address into a Java string.