public static IntPtr Copy(byte *dest, byte *src, long count) { Debug.Assert(count >= 0); return(PlatformDetails.RunningOnPosix ? Syscall.Copy(dest, src, count) : Win32UnmanagedMemory.Copy(dest, src, count)); }
/// <summary> /// Bulk copy is optimized to handle copy operations where n is statistically big. While it will use a faster copy operation for /// small amounts of memory, when you have smaller than 2048 bytes calls (depending on the target CPU) it will always be /// faster to call .Copy() directly. /// </summary> private static void BulkCopy(void *dest, void *src, long n) { Syscall.Copy((byte *)dest, (byte *)src, n); }