public static int Move(byte *dest, byte *src, long count) { Debug.Assert(count >= 0); return(PlatformDetails.RunningOnPosix ? Syscall.Move(dest, src, count) : Win32UnmanagedMemory.Move(dest, src, count)); }
public static void Move(byte *dest, byte *src, int n) { // if dest and src overlaps, we need to call specifically to memmove pinvoke supporting overlapping if (dest + n >= src && src + n >= dest) { var _ = PlatformDetails.RunningOnPosix ? Syscall.Move(dest, src, n) : Win32UnmanagedMemory.Move(dest, src, n); return; } Copy(dest, src, n); }