Пример #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));
 }