enum class TestField private constructor(private val value: Byte) { First(0.toByte()), Second(2.toByte()) } //(~93MiB) var testarray1 = ByteArray(8400 * 2400 * 4) //vs this (~331 MiB) var testarray2 = arrayOfNulls(8400 * 2400 * 4) fun main(args: Array) { test() while (true) { } }