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

public interface DataMapping<L extends MemoryLayout> extends Mapping<L>
Mapping to a non-opaque layout.
  • Method Details

    • withByteAlignment

      DataMapping<L> withByteAlignment(long byteAlignment)
      Returns a copy of this mapping with the specified byte alignment.
      Parameters:
      byteAlignment - the new byte alignment
      Returns:
      the new mapping
    • array

      default Mapping.Sequence array(long elementCount)
      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

      default MemorySegment mallocSegment(SegmentStack stack)
      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

      default MemorySegment mallocSegment(SegmentStack stack, long elementCount)
      Allocates a memory segment, without zero-initialization, for the specified number of elements on the specified segment stack.
      Parameters:
      stack - the segment stack
      elementCount - the number of elements
      Returns:
      the memory segment
    • allocateSegment

      default MemorySegment allocateSegment(SegmentStack stack)
      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

      default MemorySegment allocateSegment(SegmentAllocator allocator)
      Allocates a memory segment for a single element using the specified segment allocator.
      Parameters:
      allocator - the segment allocator
      Returns:
      the memory segment
    • allocateSegment

      default MemorySegment allocateSegment(SegmentStack stack, long elementCount)
      Allocates a memory segment, with zero-initialization, for the specified number of elements on the specified segment stack.
      Parameters:
      stack - the segment stack
      elementCount - the number of elements
      Returns:
      the memory segment
    • allocateSegment

      default MemorySegment allocateSegment(SegmentAllocator allocator, long elementCount)
      Allocates a memory segment for the specified number of elements using the specified segment allocator.
      Parameters:
      allocator - the segment allocator
      elementCount - the number of elements
      Returns:
      the memory segment