nativeHeap

Since Kotlin

1.3

Functions

Link copied to clipboard
open fun alloc(size: Int, align: Int): NativePointed
open override fun alloc(size: Long, align: Int): NativePointed
Since Kotlin 1.3
Link copied to clipboard
inline fun <T : CVariable> NativePlacement.alloc(): T

Allocates variable of given type.

Since Kotlin 1.3
inline fun <T : CVariable> NativePlacement.alloc(initialize: T.() -> Unit): T

Allocates variable of given type and initializes it applying given block.

Since Kotlin 1.3
Link copied to clipboard

Allocates C array of given elements type and length.

Since Kotlin 1.3
inline fun <T : CVariable> NativePlacement.allocArray(length: Int, initializer: T.(index: Int) -> Unit): CArrayPointer<T>
inline fun <T : CVariable> NativePlacement.allocArray(length: Long, initializer: T.(index: Long) -> Unit): CArrayPointer<T>

Allocates C array of given elements type and length, and initializes its elements applying given block.

Since Kotlin 1.3
Link copied to clipboard
inline fun <T : CPointer<*>> NativePlacement.allocArrayOf(vararg elements: T?): CArrayPointer<CPointerVarOf<T>>

Allocates C array of given values.

Since Kotlin 1.3
Since Kotlin 1.3
Link copied to clipboard

Allocates C array of pointers to given elements.

Since Kotlin 1.3
Link copied to clipboard
Link copied to clipboard
open override fun free(mem: NativePtr)
Since Kotlin 1.3
Link copied to clipboard
Since Kotlin 1.3