Interface DataMapping<L extends MemoryLayout>
- Type Parameters:
L- the memory layout type
- All Superinterfaces:
Mapping<L>
- All Known Subinterfaces:
GroupBinder<L,T>, GroupMapping<L>, IntegerMapping<L>, Mapping.Byte, Mapping.CLong, Mapping.Int, Mapping.Long, Mapping.Short, Mapping.Size, PrimitiveMapping<L>, StructBinder<T>, UnionBinder<T>
- All Known Implementing Classes:
Mapping.Boolean, Mapping.Char, Mapping.Double, Mapping.Float, Mapping.Pointer, Mapping.Sequence, Mapping.Struct, Mapping.Union
Mapping to a non-opaque layout.
-
Nested Class Summary
Nested classes/interfaces inherited from interface Mapping
Mapping.Boolean, Mapping.Byte, Mapping.Char, Mapping.CLong, Mapping.Double, Mapping.Float, Mapping.Int, Mapping.Long, Mapping.Opaque, Mapping.Pointer, Mapping.Sequence, Mapping.Short, Mapping.Size, Mapping.Struct, Mapping.Union -
Method Summary
Modifier and TypeMethodDescriptiondefault MemorySegmentallocateSegment(SegmentAllocator allocator) Allocates a memory segment for a single element using the specified segment allocator.default MemorySegmentallocateSegment(SegmentAllocator allocator, long elementCount) Allocates a memory segment for the specified number of elements using the specified segment allocator.default MemorySegmentallocateSegment(SegmentStack stack) Allocates a memory segment, with zero-initialization, for a single element on the specified segment stack.default MemorySegmentallocateSegment(SegmentStack stack, long elementCount) Allocates a memory segment, with zero-initialization, for the specified number of elements on the specified segment stack.default Mapping.Sequencearray(long elementCount) Returns a sequence mapping for an array of elements of this mapping.default MemorySegmentmallocSegment(SegmentStack stack) Allocates a memory segment, without zero-initialization, for a single element on the specified segment stack.default MemorySegmentmallocSegment(SegmentStack stack, long elementCount) Allocates a memory segment, without zero-initialization, for the specified number of elements on the specified segment stack.withByteAlignment(long byteAlignment) Returns a copy of this mapping with the specified byte alignment.
-
Method Details
-
withByteAlignment
Returns a copy of this mapping with the specified byte alignment.- Parameters:
byteAlignment- the new byte alignment- Returns:
- the new mapping
-
array
Returns a sequence mapping for an array of elements of this mapping.- Parameters:
elementCount- the number of elements in the array- Returns:
- the new mapping
-
mallocSegment
Allocates a memory segment, without zero-initialization, for a single element on the specified segment stack.- Parameters:
stack- the segment stack- Returns:
- the memory segment
-
mallocSegment
Allocates a memory segment, without zero-initialization, for the specified number of elements on the specified segment stack.- Parameters:
stack- the segment stackelementCount- the number of elements- Returns:
- the memory segment
-
allocateSegment
Allocates a memory segment, with zero-initialization, for a single element on the specified segment stack.- Parameters:
stack- the segment stack- Returns:
- the memory segment
-
allocateSegment
Allocates a memory segment for a single element using the specified segment allocator.- Parameters:
allocator- the segment allocator- Returns:
- the memory segment
-
allocateSegment
Allocates a memory segment, with zero-initialization, for the specified number of elements on the specified segment stack.- Parameters:
stack- the segment stackelementCount- the number of elements- Returns:
- the memory segment
-
allocateSegment
Allocates a memory segment for the specified number of elements using the specified segment allocator.- Parameters:
allocator- the segment allocatorelementCount- the number of elements- Returns:
- the memory segment
-