NativeFreeablePlacement
Functions
Extension Functions
alloc
Allocates variable of given type.
fun <T : CVariable> NativePlacement.alloc(): T
Allocates variable of given type and initializes it applying given block.
fun <T : CVariable> NativePlacement.alloc(
initialize: T.() -> Unit
): T
Allocates variable with given value type and initializes it with given value.
fun <T : Boolean> NativePlacement.alloc(
value: T
): BooleanVarOf<T>
allocArray
Allocates C array of given elements type and length.
fun <T : CVariable> NativePlacement.allocArray(
length: Long
): CArrayPointer<T>
fun <T : CVariable> NativePlacement.allocArray(
length: Int
): CArrayPointer<T>
Allocates C array of given elements type and length, and initializes its elements applying given block.
fun <T : CVariable> NativePlacement.allocArray(
length: Long,
initializer: T.(index: Long) -> Unit
): CArrayPointer<T>
fun <T : CVariable> NativePlacement.allocArray(
length: Int,
initializer: T.(index: Int) -> Unit
): CArrayPointer<T>
allocArrayOf
Allocates C array of given values.
fun <T : CPointer<*>> NativePlacement.allocArrayOf(
vararg elements: T?
): CArrayPointer<CPointerVarOf<T>>
fun <T : CPointer<*>> NativePlacement.allocArrayOf(
elements: List<T?>
): CArrayPointer<CPointerVarOf<T>>
fun NativePlacement.allocArrayOf(
elements: ByteArray
): CArrayPointer<ByteVar>
fun NativePlacement.allocArrayOf(
vararg elements: Float
): CArrayPointer<FloatVar>
allocArrayOfPointersTo
Allocates C array of pointers to given elements.
fun <T : CPointed> NativePlacement.allocArrayOfPointersTo(
elements: List<T?>
): CArrayPointer<CPointerVar<T>>
fun <T : CPointed> NativePlacement.allocArrayOfPointersTo(
vararg elements: T?
): CArrayPointer<CPointerVar<T>>
allocPointerTo
fun <T : CPointed> NativePlacement.allocPointerTo(): CPointerVar<T>
free
fun NativeFreeablePlacement.free(pointer: CPointer<*>)
fun NativeFreeablePlacement.free(pointed: NativePointed)
Inheritors
nativeHeap
object nativeHeap : NativeFreeablePlacement