# Uses of Interface
jdk.incubator.foreign.NativeScope

Packages that use NativeScope
Package
Description
jdk.incubator.foreign
Classes to support low-level and efficient foreign memory/function access, directly from Java.

## Uses of NativeScope in jdk.incubator.foreign

Methods in jdk.incubator.foreign that return NativeScope
Modifier and Type
Method
Description
`static NativeScope`
NativeScope.`boundedScope​(long size)`
Creates a new bounded native scope, backed by off-heap memory.
`static NativeScope`
NativeScope.`unboundedScope()`
Creates a new unbounded native scope, backed by off-heap memory.
Methods in jdk.incubator.foreign with parameters of type NativeScope
Modifier and Type
Method
Description
`CLinker.VaList`
CLinker.VaList.`copy​(NativeScope scope)`
Copies this C `va_list` at its current position.
`MemorySegment`
MemorySegment.`handoff​(NativeScope nativeScope)`
Obtains a new confined memory segment backed by the same underlying memory region as this segment, but whose temporal bounds are controlled by the provided `NativeScope` instance.
`static CLinker.VaList`
CLinker.VaList.`make​(Consumer<CLinker.VaList.Builder> actions, NativeScope scope)`
Constructs a new `VaList` using a builder (see `CLinker.VaList.Builder`).
`static MemorySegment`
CLinker.`toCString​(String str, Charset charset, NativeScope scope)`
Converts a Java string into a null-terminated C string, using the given `charset`, storing the result into a new native memory segment native memory segment allocated using the provided scope.
`static MemorySegment`
CLinker.`toCString​(String str, NativeScope scope)`
Converts a Java string into a null-terminated C string, using the platform's default charset, storing the result into a native memory segment allocated using the provided scope.
`MemorySegment`
CLinker.VaList.`vargAsSegment​(MemoryLayout layout, NativeScope scope)`
Reads the next value as a `MemorySegment`, and advances this va list's position.