unsafe fn memcpy_fallible(dst: *mut u8, src: *const u8, len: usize) -> usizeExpand description
Copies len bytes from src to dst.
This function will early stop copying if encountering an unresolvable page fault.
Returns the number of successfully copied bytes.
In the following cases, this method may cause unexpected bytes to be copied, but will not cause safety problems as long as the safety requirements are met:
- The source and destination overlap.
- The current context is not associated with valid user space (e.g., in the kernel thread).
-
srcmust either be [valid] for reads oflenbytes or be in user space forlenbytes -
dstmust either be [valid] for writes oflenbytes or be in user space forlenbytes