unsafe fn copy_regions_to_mut_ptr(
    mem: &GuestMemory,
    src: MemRegionIter<'_>,
    dst: *mut u8,
    size: usize
) -> Result<usize>
Expand description

Copy up to size bytes from src into dst.

Returns the total number of bytes copied.

§Safety

The caller must ensure that it is safe to write size bytes of data into dst.

After the function returns, it is only safe to assume that the number of bytes indicated by the return value (which may be less than the requested size) have been initialized. Bytes beyond that point are not initialized by this function.