fn ptr_as_ref<T>(ptr: *const u8) -> Result<*const T, SyscallArgError>