Uses of Interface
jdk.incubator.foreign.MemoryLayout
Packages that use MemoryLayout
Package
Description
Classes to support low-level and efficient foreign memory/function access, directly from Java.
-
Uses of MemoryLayout in jdk.incubator.foreign
Classes in jdk.incubator.foreign that implement MemoryLayoutModifier and TypeClassDescriptionfinal classA group layout is used to combine together multiple member layouts.final classA sequence layout.final classA value layout.Fields in jdk.incubator.foreign declared as MemoryLayoutModifier and TypeFieldDescriptionstatic final MemoryLayoutCLinker.C_VA_LISTThe layout for theva_listC typestatic final MemoryLayoutMemoryLayouts.PAD_16A padding layout constant with size of two bytes.static final MemoryLayoutMemoryLayouts.PAD_32A padding layout constant with size of four bytes.static final MemoryLayoutMemoryLayouts.PAD_64A padding layout constant with size of eight bytes.static final MemoryLayoutMemoryLayouts.PAD_8A padding layout constant with size of one byte.Methods in jdk.incubator.foreign with type parameters of type MemoryLayoutModifier and TypeMethodDescriptionstatic <T extends MemoryLayout>
TCLinker.asVarArg(T layout) Returns a memory layout that is suitable to use as the layout for variadic arguments in a specialized function descriptor.Methods in jdk.incubator.foreign that return MemoryLayoutModifier and TypeMethodDescriptionSequenceLayout.elementLayout()Returns the element layout associated with this sequence layout.default MemoryLayoutMemoryLayout.map(UnaryOperator<MemoryLayout> op, MemoryLayout.PathElement... elements) Creates a transformed copy of this layout where a selected layout, from a path rooted in this layout, is replaced with the result of applying the given operation.static MemoryLayoutMemoryLayout.paddingLayout(long size) Create a new padding layout with given size.default MemoryLayoutMemoryLayout.select(MemoryLayout.PathElement... elements) Selects the layout from a path rooted in this layout.MemoryLayout.withAttribute(String name, Constable value) Returns a new memory layout which features the same attributes as this layout, plus the newly specified attribute.MemoryLayout.withBitAlignment(long bitAlignment) Creates a new layout which features the desired alignment constraint.Creates a new layout which features the desired layout name.Methods in jdk.incubator.foreign that return types with arguments of type MemoryLayoutModifier and TypeMethodDescriptionFunctionDescriptor.argumentLayouts()Returns the argument layouts associated with this function.Optional<? extends DynamicConstantDesc<? extends MemoryLayout>>MemoryLayout.describeConstable()GroupLayout.memberLayouts()Returns the member layouts associated with this group.FunctionDescriptor.returnLayout()Returns the return layout associated with this function.Methods in jdk.incubator.foreign with parameters of type MemoryLayoutModifier and TypeMethodDescriptiondefault MemorySegmentSegmentAllocator.allocate(MemoryLayout layout) Allocate a block of memory with given layout.default MemorySegmentSegmentAllocator.allocateArray(MemoryLayout elementLayout, long count) Allocate a block of memory corresponding to an array with given element layout and size.static MemorySegmentMemorySegment.allocateNative(MemoryLayout layout, ResourceScope scope) Creates a new confined native memory segment that models a newly allocated block of off-heap memory with given layout and resource scope.MemorySegment.elements(MemoryLayout elementLayout) Returns a sequentialStreamover disjoint slices (whose size matches that of the specified layout) in this segment.static FunctionDescriptorFunctionDescriptor.of(MemoryLayout resLayout, MemoryLayout... argLayouts) Create a function descriptor with given return and argument layouts.static FunctionDescriptorFunctionDescriptor.ofVoid(MemoryLayout... argLayouts) Create a function descriptor with given argument layouts and no return layout.static SequenceLayoutMemoryLayout.sequenceLayout(long elementCount, MemoryLayout elementLayout) Create a new sequence layout with given element layout and element count.static SequenceLayoutMemoryLayout.sequenceLayout(MemoryLayout elementLayout) Create a new sequence layout, with unbounded element count and given element layout.voidCLinker.VaList.skip(MemoryLayout... layouts) Skips a number of elements with the given memory layouts, and advances this va list's position.MemorySegment.spliterator(MemoryLayout elementLayout) Returns a spliterator for this memory segment.static GroupLayoutMemoryLayout.structLayout(MemoryLayout... elements) Create a new struct group layout with given member layouts.static GroupLayoutMemoryLayout.unionLayout(MemoryLayout... elements) Create a new union group layout with given member layouts.CLinker.VaList.vargAsAddress(MemoryLayout layout) Reads the next value as aMemoryAddressand advances this va list's position.doubleCLinker.VaList.vargAsDouble(MemoryLayout layout) Reads the next value as adoubleand advances this va list's position.intCLinker.VaList.vargAsInt(MemoryLayout layout) Reads the next value as anintand advances this va list's position.longCLinker.VaList.vargAsLong(MemoryLayout layout) Reads the next value as alongand advances this va list's position.CLinker.VaList.vargAsSegment(MemoryLayout layout, ResourceScope scope) Reads the next value as aMemorySegment, and advances this va list's position.CLinker.VaList.vargAsSegment(MemoryLayout layout, SegmentAllocator allocator) Reads the next value as aMemorySegment, and advances this va list's position.FunctionDescriptor.withAppendedArgumentLayouts(MemoryLayout... addedLayouts) Create a new function descriptor with the given argument layouts appended to the argument layout array of this function descriptor.FunctionDescriptor.withReturnLayout(MemoryLayout newReturn) Create a new function descriptor with the given memory layout as the new return layout.Method parameters in jdk.incubator.foreign with type arguments of type MemoryLayoutModifier and TypeMethodDescriptiondefault MemoryLayoutMemoryLayout.map(UnaryOperator<MemoryLayout> op, MemoryLayout.PathElement... elements) Creates a transformed copy of this layout where a selected layout, from a path rooted in this layout, is replaced with the result of applying the given operation.