You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make copy_slice_volatile use pointers instead of slices
First commit in a series of commits to elimate slices to guest memory.
Additionally, changes pointer arithmetic to use std:ptr::add and adds
safety comments explaining why invariants of pointer arithmetic are
upheld.
Function is now marked unsafe because part of the invariants have to be
upheld by the caller. Requirement for the memory regions to be
non overlapping is due to the copy loop not correctly copying
values if the regions do overlap (however, since the function is
only called for copy from guest-memory to rust-memory or vice-versa,
this is trivially unheld in praxis).
Lastly, changes `copy_single` to take pointer arguments instead of
usize, to avoid unneccessary conversion of the form
*u8 -> usize -> *u8.
Related to #45
Signed-off-by: Patrick Roy <[email protected]>
0 commit comments