示例#1
0
 public static void MemoryClear(IntPtr dest, uint count)
 {
     // FUTURE: Improve
     for (int i = 0; i < count; i++)
     {
         Intrinsic.Store8(dest, i, 0);
     }
 }
示例#2
0
 public static void MemorySet(IntPtr dest, byte value, uint count)
 {
     // FUTURE: Improve
     for (int i = 0; i < count; i++)
     {
         Intrinsic.Store8(dest, i, value);
     }
 }
示例#3
0
 public static void MemoryCopy(IntPtr dest, IntPtr src, uint count)
 {
     // FUTURE: Improve
     for (int i = 0; i < count; i++)
     {
         byte value = Intrinsic.Load8(src, i);
         Intrinsic.Store8(dest, i, value);
     }
 }
示例#4
0
        public static IntPtr Box8(RuntimeTypeHandle handle, byte value)
        {
            var memory = AllocateObject(handle, IntPtr.Size);

            Intrinsic.Store(memory, 0, handle.Value);
            Intrinsic.Store8(memory, IntPtr.Size * 2, value);

            return(memory);
        }
示例#5
0
 public void Store8(int offset, byte value)
 {
     Intrinsic.Store8(this, offset, value);
 }
示例#6
0
 public void Store8(byte value)
 {
     Intrinsic.Store8(this, value);
 }
示例#7
0
 public void Store24(uint offset, uint value)
 {
     Intrinsic.Store16(this, offset, (ushort)(value & 0xFFFF));
     Intrinsic.Store8(this, offset + 2, (byte)((value >> 16) & 0xFF));
 }