class Unsafe


Summary

Constants

const Int

Public functions

native Int
native Any!
native Long
Int
Int
native Boolean
compareAndSwapInt(obj: Any!, offset: Long, expectedValue: Int, newValue: Int)
native Boolean
compareAndSwapLong(
    obj: Any!,
    offset: Long,
    expectedValue: Long,
    newValue: Long
)
native Boolean
compareAndSwapObject(
    obj: Any!,
    offset: Long,
    expectedValue: Any!,
    newValue: Any!
)
native Unit
copyMemory(srcAddr: Long, dstAddr: Long, bytes: Long)
native Unit
copyMemoryFromPrimitiveArray(
    src: Any!,
    srcOffset: Long,
    dstAddr: Long,
    bytes: Long
)
native Unit
copyMemoryToPrimitiveArray(
    srcAddr: Long,
    dst: Any!,
    dstOffset: Long,
    bytes: Long
)
native Unit
freeMemory(address: Long)
native Unit
Int
getAndAddInt(o: Any!, offset: Long, delta: Int)
Long
getAndAddLong(o: Any!, offset: Long, delta: Long)
Int
getAndSetInt(o: Any!, offset: Long, newValue: Int)
Long
getAndSetLong(o: Any!, offset: Long, newValue: Long)
Any!
getAndSetObject(o: Any!, offset: Long, newValue: Any!)
native Boolean
getBoolean(obj: Any!, offset: Long)
native Byte
getByte(address: Long)
native Byte
getByte(obj: Any!, offset: Long)
native Char
getChar(address: Long)
native Char
getChar(obj: Any!, offset: Long)
native Double
getDouble(address: Long)
native Double
getDouble(obj: Any!, offset: Long)
native Float
getFloat(address: Long)
native Float
getFloat(obj: Any!, offset: Long)
native Int
getInt(address: Long)
native Int
getInt(obj: Any!, offset: Long)
native Int
getIntVolatile(obj: Any!, offset: Long)
native Long
getLong(address: Long)
native Long
getLong(obj: Any!, offset: Long)
native Long
getLongVolatile(obj: Any!, offset: Long)
native Any!
getObject(obj: Any!, offset: Long)
native Any!
getObjectVolatile(obj: Any!, offset: Long)
native Short
getShort(address: Long)
native Short
getShort(obj: Any!, offset: Long)
java-static Unsafe!
native Unit
Long
native Int
Unit
park(absolute: Boolean, time: Long)
native Unit
putBoolean(obj: Any!, offset: Long, newValue: Boolean)
native Unit
putByte(address: Long, x: Byte)
native Unit
putByte(obj: Any!, offset: Long, newValue: Byte)
native Unit
putChar(address: Long, x: Char)
native Unit
putChar(obj: Any!, offset: Long, newValue: Char)
native Unit
putDouble(address: Long, x: Double)
native Unit
putDouble(obj: Any!, offset: Long, newValue: Double)
native Unit
putFloat(address: Long, x: Float)
native Unit
putFloat(obj: Any!, offset: Long, newValue: Float)
native Unit
putInt(address: Long, x: Int)
native Unit
putInt(obj: Any!, offset: Long, newValue: Int)
native Unit
putIntVolatile(obj: Any!, offset: Long, newValue: Int)
native Unit
putLong(address: Long, x: Long)
native Unit
putLong(obj: Any!, offset: Long, newValue: Long)
native Unit
putLongVolatile(obj: Any!, offset: Long, newValue: Long)
native Unit
putObject(obj: Any!, offset: Long, newValue: Any!)
native Unit
putObjectVolatile(obj: Any!, offset: Long, newValue: Any!)
native Unit
putOrderedInt(obj: Any!, offset: Long, newValue: Int)
native Unit
putOrderedLong(obj: Any!, offset: Long, newValue: Long)
native Unit
putOrderedObject(obj: Any!, offset: Long, newValue: Any!)
native Unit
putShort(address: Long, x: Short)
native Unit
putShort(obj: Any!, offset: Long, newValue: Short)
native Unit
setMemory(address: Long, bytes: Long, value: Byte)
native Unit
Unit
unpark(obj: Any!)

Constants

INVALID_FIELD_OFFSET

Added in 1.0.0-alpha01
const val INVALID_FIELD_OFFSET = -1: Int

Public functions

addressSize

Added in 1.0.0-alpha01
native fun addressSize(): Int

allocateInstance

Added in 1.0.0-alpha01
native fun allocateInstance(c: Class<Any!>!): Any!

allocateMemory

Added in 1.0.0-alpha01
native fun allocateMemory(bytes: Long): Long

arrayBaseOffset

Added in 1.0.0-alpha01
fun arrayBaseOffset(clazz: Class<Any!>!): Int

arrayIndexScale

Added in 1.0.0-alpha01
fun arrayIndexScale(clazz: Class<Any!>!): Int

compareAndSwapInt

Added in 1.0.0-alpha01
native fun compareAndSwapInt(obj: Any!, offset: Long, expectedValue: Int, newValue: Int): Boolean

compareAndSwapLong

Added in 1.0.0-alpha01
native fun compareAndSwapLong(
    obj: Any!,
    offset: Long,
    expectedValue: Long,
    newValue: Long
): Boolean

compareAndSwapObject

Added in 1.0.0-alpha01
native fun compareAndSwapObject(
    obj: Any!,
    offset: Long,
    expectedValue: Any!,
    newValue: Any!
): Boolean

copyMemory

Added in 1.0.0-alpha01
native fun copyMemory(srcAddr: Long, dstAddr: Long, bytes: Long): Unit

copyMemoryFromPrimitiveArray

Added in 1.0.0-alpha01
native fun copyMemoryFromPrimitiveArray(
    src: Any!,
    srcOffset: Long,
    dstAddr: Long,
    bytes: Long
): Unit

copyMemoryToPrimitiveArray

Added in 1.0.0-alpha01
native fun copyMemoryToPrimitiveArray(
    srcAddr: Long,
    dst: Any!,
    dstOffset: Long,
    bytes: Long
): Unit

freeMemory

Added in 1.0.0-alpha01
native fun freeMemory(address: Long): Unit

fullFence

Added in 1.0.0-alpha01
native fun fullFence(): Unit

getAndAddInt

Added in 1.0.0-alpha01
fun getAndAddInt(o: Any!, offset: Long, delta: Int): Int

getAndAddLong

Added in 1.0.0-alpha01
fun getAndAddLong(o: Any!, offset: Long, delta: Long): Long

getAndSetInt

Added in 1.0.0-alpha01
fun getAndSetInt(o: Any!, offset: Long, newValue: Int): Int

getAndSetLong

Added in 1.0.0-alpha01
fun getAndSetLong(o: Any!, offset: Long, newValue: Long): Long

getAndSetObject

Added in 1.0.0-alpha01
fun getAndSetObject(o: Any!, offset: Long, newValue: Any!): Any!

getBoolean

Added in 1.0.0-alpha01
native fun getBoolean(obj: Any!, offset: Long): Boolean

getByte

Added in 1.0.0-alpha01
native fun getByte(address: Long): Byte

getByte

Added in 1.0.0-alpha01
native fun getByte(obj: Any!, offset: Long): Byte

getChar

Added in 1.0.0-alpha01
native fun getChar(address: Long): Char

getChar

Added in 1.0.0-alpha01
native fun getChar(obj: Any!, offset: Long): Char

getDouble

Added in 1.0.0-alpha01
native fun getDouble(address: Long): Double

getDouble

Added in 1.0.0-alpha01
native fun getDouble(obj: Any!, offset: Long): Double

getFloat

Added in 1.0.0-alpha01
native fun getFloat(address: Long): Float

getFloat

Added in 1.0.0-alpha01
native fun getFloat(obj: Any!, offset: Long): Float

getInt

Added in 1.0.0-alpha01
native fun getInt(address: Long): Int

getInt

Added in 1.0.0-alpha01
native fun getInt(obj: Any!, offset: Long): Int

getIntVolatile

Added in 1.0.0-alpha01
native fun getIntVolatile(obj: Any!, offset: Long): Int

getLong

Added in 1.0.0-alpha01
native fun getLong(address: Long): Long

getLong

Added in 1.0.0-alpha01
native fun getLong(obj: Any!, offset: Long): Long

getLongVolatile

Added in 1.0.0-alpha01
native fun getLongVolatile(obj: Any!, offset: Long): Long

getObject

Added in 1.0.0-alpha01
native fun getObject(obj: Any!, offset: Long): Any!

getObjectVolatile

Added in 1.0.0-alpha01
native fun getObjectVolatile(obj: Any!, offset: Long): Any!

getShort

Added in 1.0.0-alpha01
native fun getShort(address: Long): Short

getShort

Added in 1.0.0-alpha01
native fun getShort(obj: Any!, offset: Long): Short

getUnsafe

Added in 1.0.0-alpha01
java-static fun getUnsafe(): Unsafe!

loadFence

Added in 1.0.0-alpha01
native fun loadFence(): Unit

objectFieldOffset

Added in 1.0.0-alpha01
fun objectFieldOffset(field: Field!): Long

pageSize

Added in 1.0.0-alpha01
native fun pageSize(): Int

park

Added in 1.0.0-alpha01
fun park(absolute: Boolean, time: Long): Unit

putBoolean

Added in 1.0.0-alpha01
native fun putBoolean(obj: Any!, offset: Long, newValue: Boolean): Unit

putByte

Added in 1.0.0-alpha01
native fun putByte(address: Long, x: Byte): Unit

putByte

Added in 1.0.0-alpha01
native fun putByte(obj: Any!, offset: Long, newValue: Byte): Unit

putChar

Added in 1.0.0-alpha01
native fun putChar(address: Long, x: Char): Unit

putChar

Added in 1.0.0-alpha01
native fun putChar(obj: Any!, offset: Long, newValue: Char): Unit

putDouble

Added in 1.0.0-alpha01
native fun putDouble(address: Long, x: Double): Unit

putDouble

Added in 1.0.0-alpha01
native fun putDouble(obj: Any!, offset: Long, newValue: Double): Unit

putFloat

Added in 1.0.0-alpha01
native fun putFloat(address: Long, x: Float): Unit

putFloat

Added in 1.0.0-alpha01
native fun putFloat(obj: Any!, offset: Long, newValue: Float): Unit

putInt

Added in 1.0.0-alpha01
native fun putInt(address: Long, x: Int): Unit

putInt

Added in 1.0.0-alpha01
native fun putInt(obj: Any!, offset: Long, newValue: Int): Unit

putIntVolatile

Added in 1.0.0-alpha01
native fun putIntVolatile(obj: Any!, offset: Long, newValue: Int): Unit

putLong

Added in 1.0.0-alpha01
native fun putLong(address: Long, x: Long): Unit

putLong

Added in 1.0.0-alpha01
native fun putLong(obj: Any!, offset: Long, newValue: Long): Unit

putLongVolatile

Added in 1.0.0-alpha01
native fun putLongVolatile(obj: Any!, offset: Long, newValue: Long): Unit

putObject

Added in 1.0.0-alpha01
native fun putObject(obj: Any!, offset: Long, newValue: Any!): Unit

putObjectVolatile

Added in 1.0.0-alpha01
native fun putObjectVolatile(obj: Any!, offset: Long, newValue: Any!): Unit

putOrderedInt

Added in 1.0.0-alpha01
native fun putOrderedInt(obj: Any!, offset: Long, newValue: Int): Unit

putOrderedLong

Added in 1.0.0-alpha01
native fun putOrderedLong(obj: Any!, offset: Long, newValue: Long): Unit

putOrderedObject

Added in 1.0.0-alpha01
native fun putOrderedObject(obj: Any!, offset: Long, newValue: Any!): Unit

putShort

Added in 1.0.0-alpha01
native fun putShort(address: Long, x: Short): Unit

putShort

Added in 1.0.0-alpha01
native fun putShort(obj: Any!, offset: Long, newValue: Short): Unit

setMemory

Added in 1.0.0-alpha01
native fun setMemory(address: Long, bytes: Long, value: Byte): Unit

storeFence

Added in 1.0.0-alpha01
native fun storeFence(): Unit

unpark

Added in 1.0.0-alpha01
fun unpark(obj: Any!): Unit