fn ptr_as_mut<T>(ptr: *mut u8) -> Result<*mut T, SyscallArgError>