9 [StructLayout(
LayoutKind.Sequential, Size = 16)]
14 [StructLayout(
LayoutKind.Sequential, Size = 64)]
20 internal unsafe
static void _ZeroMemory(ref
byte b, nuint byteLength)
29 private unsafe
static extern void __ZeroMemory(
void* b, nuint byteLength);
77 private unsafe
static extern void __Memmove(
byte* dest,
byte* src, nuint
len);
79 internal unsafe
static void Memcpy(
byte* dest,
byte* src,
int len)
84 internal unsafe
static void Memcpy(
byte* pDest,
int destIndex,
byte[] src,
int srcIndex,
int len)
113 if (src.GetType() != typeof(
byte[]))
119 num *= src.GetElementSize();
125 if (dst.GetType() != typeof(
byte[]))
131 num2 *= dst.GetElementSize();
146 nuint num3 = (nuint)
count;
147 nuint num4 = (nuint)srcOffset;
148 nuint num5 = (nuint)dstOffset;
149 if (num < num4 + num3 || num2 < num5 + num3)
162 if (!
array.GetCorElementTypeOfElementType().IsPrimitiveType())
166 nuint num = array.NativeLength *
array.GetElementSize();
167 return checked((
int)num);
194 [CLSCompliant(
false)]
205 [CLSCompliant(
false)]
215 internal static void Memmove(ref
byte dest, ref
byte src, nuint
len)
217 if ((nuint)(nint)
Unsafe.ByteOffset(ref src, ref dest) >=
len && (nuint)(nint)
Unsafe.ByteOffset(ref dest, ref src) >=
len)
220 ref
byte source2 = ref
Unsafe.Add(ref dest, (nint)
len);
229 nuint num =
len >> 6;
233 dest = ref
Unsafe.Add(ref dest, 64);
234 src = ref
Unsafe.Add(ref src, 64);
256 else if ((
len & 0x18) != 0)
258 Unsafe.As<byte,
long>(ref dest) =
Unsafe.As<
byte,
long>(ref src);
261 else if ((
len & 4) != 0)
263 Unsafe.As<byte,
int>(ref dest) =
Unsafe.As<
byte,
int>(ref src);
276 if (
Unsafe.AreSame(ref dest, ref src))
286 private unsafe
static void _Memmove(ref
byte dest, ref
byte src, nuint
len)
288 fixed (
byte* dest2 = &dest)
290 fixed (
byte* src2 = &src)
CorElementType GetCorElementTypeOfElementType()
static void Memmove< T >(ref T destination, ref T source, nuint elementCount)
static unsafe void ZeroMemory(byte *dest, nuint len)
static void BulkMoveWithWriteBarrier(ref byte destination, ref byte source, nuint byteCount)
static unsafe void Memcpy(byte *pDest, int destIndex, byte[] src, int srcIndex, int len)
static unsafe void MemoryCopy(void *source, void *destination, long destinationSizeInBytes, long sourceBytesToCopy)
static void BlockCopy(Array src, int srcOffset, Array dst, int dstOffset, int count)
static unsafe void __Memmove(byte *dest, byte *src, nuint len)
static void _BulkMoveWithWriteBarrier(ref byte destination, ref byte source, nuint byteCount)
static void SetByte(Array array, int index, byte value)
static void Memmove(ref byte dest, ref byte src, nuint len)
static unsafe void __ZeroMemory(void *b, nuint byteLength)
static unsafe void _ZeroMemory(ref byte b, nuint byteLength)
static byte GetByte(Array array, int index)
static int ByteLength(Array array)
static void __BulkMoveWithWriteBarrier(ref byte destination, ref byte source, nuint byteCount)
static unsafe void MemoryCopy(void *source, void *destination, ulong destinationSizeInBytes, ulong sourceBytesToCopy)
static unsafe void Memcpy(byte *dest, byte *src, int len)
static unsafe void _Memmove(ref byte dest, ref byte src, nuint len)
static unsafe ref byte GetArrayDataReference(Array array)
static string ArgumentOutOfRange_MustBeNonNegInt32
static string Arg_MustBePrimArray
static string Argument_InvalidOffLen
static void ClearWithoutReferences(ref byte b, nuint byteLength)
static void ThrowArgumentOutOfRangeException(System.ExceptionArgument argument)