FFI function needs contiguous memory - fixed