anyone have any thoughts as to why accessing the r...
# kotlin-native
k
anyone have any thoughts as to why accessing the result of
mmap
as a
CPointer<ByteVar>
would cause a SIGBUS?
Copy code
val bytes = ByteArray(Int.SIZE_BYTES)
        bytes.setIntAt(0, newPos)
        bytes.forEachIndexed { i: Int, byte: Byte ->
            buffer[i] = byte
        }
buffer =
COpaquePointer
reinterpreted as
CPointer<ByteVar>
i wonder if it's because I am executing a test on the iOS sim, but using a file path with /tmp
but the call to mmap succeeds
damn, have to explicitly ensure the file is the right size!