MemorySegment

class MemorySegment(val pointer: Pointer, val size: Long = -1)

Constructors

Link copied to clipboard
constructor(address: Long, size: Long = -1)
constructor(pointer: Pointer, size: Long = -1)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val pointer: Pointer
Link copied to clipboard
val size: Long

Functions

Link copied to clipboard
fun asSlice(offest: Long, size: Long = 0): MemorySegment
Link copied to clipboard
Link copied to clipboard
fun get(layout: ValueLayout.OfDouble?, offest: Long): Double
fun get(layout: ValueLayout.OfFloat?, offest: Long): Float
fun get(layout: ValueLayout.OfInt?, offest: Long): Int
fun get(layout: ValueLayout.OfLong?, offest: Long): Long
fun get(layout: ValueLayout.OfShort?, offest: Long): Short
fun get(layout: AddressLayout?, offest: Long): MemorySegment
Link copied to clipboard
Link copied to clipboard
fun set(layout: ValueLayout.OfDouble?, offest: Long, newValue: Double)
fun set(layout: ValueLayout.OfFloat?, offest: Long, newValue: Float)
fun set(layout: ValueLayout.OfInt?, offest: Long, newValue: Int)
fun set(layout: ValueLayout.OfLong?, offest: Long, newValue: Long)
fun set(layout: ValueLayout.OfShort?, offest: Long, newValue: Short)
fun set(layout: AddressLayout?, offest: Long, newValue: MemorySegment)
Link copied to clipboard
fun setAtIndex(layout: ValueLayout.OfInt, offest: Long, value: Int)