예제 #1
0
 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));
 }
예제 #2
0
        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);
        }
예제 #3
0
 public static int Move(byte *b1, byte *b2, int count)
 {
     return(Platform.RunningOnPosix
         ? PosixUnmanagedMemory.Move(b1, b2, count)
         : Win32UnmanagedMemory.Move(b1, b2, count));
 }