Uses of Interface
java.lang.foreign.Arena
Package
Description
Provides low-level access to memory and functions outside the Java runtime.
Defines channels, which represent connections to entities that are capable of
performing I/O operations, such as files and sockets; defines selectors, for
multiplexed, non-blocking I/O operations.
-
Uses of Arena in java.lang.foreign
Modifier and TypeMethodDescriptionstatic Arena
Arena.global()
Returns the global arena.static Arena
Arena.ofAuto()
Creates a new arena that is managed, automatically, by the garbage collector.static Arena
Arena.ofConfined()
Returns a new confined arena.static Arena
Arena.ofShared()
Returns a new shared arena.Modifier and TypeMethodDescriptionstatic SymbolLookup
SymbolLookup.libraryLookup
(String name, Arena arena) Restricted.Loads a library with the given name (if not already loaded) and creates a symbol lookup for symbols in that library.static SymbolLookup
SymbolLookup.libraryLookup
(Path path, Arena arena) Restricted.Loads a library from the given path (if not already loaded) and creates a symbol lookup for symbols in that library.MemorySegment.reinterpret
(long newSize, Arena arena, Consumer<MemorySegment> cleanup) Restricted.Returns a new segment with the same address as this segment, but with the provided size and scope.MemorySegment.reinterpret
(Arena arena, Consumer<MemorySegment> cleanup) Restricted.Returns a new memory segment with the same address and size as this segment, but with the provided scope.Linker.upcallStub
(MethodHandle target, FunctionDescriptor function, Arena arena, Linker.Option... options) Restricted.Creates an upcall stub which can be passed to other foreign functions as a function pointer, associated with the given arena. -
Uses of Arena in java.nio.channels
Modifier and TypeMethodDescriptionFileChannel.map
(FileChannel.MapMode mode, long offset, long size, Arena arena) Maps a region of this channel's file into a new mapped memory segment, with the given offset, size and arena.