Uses of Interface
jdk.incubator.foreign.ResourceScope
Packages that use ResourceScope
Package
Description
Classes to support low-level and efficient foreign memory/function access, directly from Java.
-
Uses of ResourceScope in jdk.incubator.foreign
Methods in jdk.incubator.foreign that return ResourceScopeModifier and TypeMethodDescriptionstatic ResourceScopeResourceScope.globalScope()Returns the global scope.static ResourceScopeResourceScope.newConfinedScope()Creates a new confined scope.static ResourceScopeResourceScope.newConfinedScope(Cleaner cleaner) Creates a new confined scope, managed by the provided cleaner instance.static ResourceScopeResourceScope.newImplicitScope()Creates a new shared scope, managed by a privateCleanerinstance.static ResourceScopeResourceScope.newSharedScope()Creates a new shared scope.static ResourceScopeResourceScope.newSharedScope(Cleaner cleaner) Creates a new shared scope, managed by the provided cleaner instance.MemorySegment.scope()Returns the resource scope associated with this memory segment.NativeSymbol.scope()Returns the resource scope associated with this symbol.VaList.scope()Returns the resource scope associated with this variable argument list.Methods in jdk.incubator.foreign with parameters of type ResourceScopeModifier and TypeMethodDescriptionstatic MemorySegmentMemorySegment.allocateNative(long bytesSize, long alignmentBytes, ResourceScope scope) Creates a new native memory segment that models a newly allocated block of off-heap memory with given size (in bytes), alignment constraint (in bytes) and resource scope.static MemorySegmentMemorySegment.allocateNative(long bytesSize, ResourceScope scope) Creates a new native memory segment that models a newly allocated block of off-heap memory with given size (in bytes) and resource scope.static MemorySegmentMemorySegment.allocateNative(MemoryLayout layout, ResourceScope scope) Creates a new native memory segment that models a newly allocated block of off-heap memory with given layout and resource scope.voidResourceScope.keepAlive(ResourceScope target) Creates a temporal dependency between this scope and the target scope.static VaListVaList.make(Consumer<VaList.Builder> actions, ResourceScope scope) Constructs a new variable argument list using a builder (seeVaList.Builder), with a given resource scope.static MemorySegmentMemorySegment.mapFile(Path path, long bytesOffset, long bytesSize, FileChannel.MapMode mapMode, ResourceScope scope) Creates a new mapped memory segment that models a memory-mapped region of a file from a given path.static SegmentAllocatorSegmentAllocator.nativeAllocator(ResourceScope scope) Returns a native allocator, associated with the provided scope.static SegmentAllocatorSegmentAllocator.newNativeArena(long arenaSize, long blockSize, ResourceScope scope) Returns a native arena-based allocator, associated with the provided scope, with given arena size and block size.static SegmentAllocatorSegmentAllocator.newNativeArena(long arenaSize, ResourceScope scope) Returns a native unbounded arena-based allocator, with block size set to the specified arena size, associated with the provided scope, with given arena size.static SegmentAllocatorSegmentAllocator.newNativeArena(ResourceScope scope) Returns a native unbounded arena-based allocator, with predefined block size and maximum arena size, associated with the provided scope.static MemorySegmentMemorySegment.ofAddress(MemoryAddress address, long bytesSize, ResourceScope scope) Creates a new native memory segment with given size and resource scope, and whose base address is the given address.static NativeSymbolNativeSymbol.ofAddress(String name, MemoryAddress address, ResourceScope scope) Creates a new symbol from given name, address and scope.static VaListVaList.ofAddress(MemoryAddress address, ResourceScope scope) Constructs a new variable argument list from a memory address pointing to an existing variable argument list, with given resource scope.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.