Exemplo n.º 1
0
 public static void MemoryCopy(Pointer dest, Pointer src, uint count)
 {
     // FUTURE: Improve
     for (int i = 0; i < count; i++)
     {
         byte value = src.Load8(i);
         dest.Store8(i, value);
     }
 }
Exemplo n.º 2
0
        public static void MemoryCopy(Pointer dest, Pointer src, uint count)
        {
            uint count32 = count >> 2;

            for (uint i = 0; i < count32; i++)
            {
                uint value = src.Load32(i << 2);
                dest.Store32(i << 2, value);
            }

            uint count8 = count & 0x03;

            for (uint i = 0; i < count8; i++)
            {
                byte value = src.Load8(count32 + i);
                dest.Store8(count32 + i, value);
            }
        }