crosvm/devices
Chirantan Ekbote 46ab05d1e9 descriptor_utils: Use copy_nonoverlapping
Replace the copy_{to,from} calls for VolatileSlice with
ptr::copy_nonoverlapping.  The copy_{to,from} implementations were doing
a volatile read/write per byte, which is significantly slower than just
using a memcpy.

Using copy_nonoverlapping should be safe here as that's how this was
implemented before the refactor.

BUG=chromium:1014999
TEST=unit tests

Change-Id: Iad29e76056ff3064a5fe7e816b517b4ac75eaaef
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1866894
Commit-Queue: Chirantan Ekbote <chirantan@chromium.org>
Tested-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-by: Stephen Barber <smbarber@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2019-10-28 09:07:36 +00:00
..
src descriptor_utils: Use copy_nonoverlapping 2019-10-28 09:07:36 +00:00
Cargo.toml