Example #1
0
 public static void WriteBytes(AMemory Memory, long Position, byte[] Data)
 {
     for (int Offs = 0; Offs < Data.Length; Offs++)
     {
         Memory.WriteByte(Position + Offs, Data[Offs]);
     }
 }
Example #2
0
        public static void FillWithZeros(AMemory Memory, long Position, int Size)
        {
            int Size8 = Size & ~(8 - 1);

            for (int Offs = 0; Offs < Size8; Offs += 8)
            {
                Memory.WriteInt64(Position + Offs, 0);
            }

            for (int Offs = Size8; Offs < (Size - Size8); Offs++)
            {
                Memory.WriteByte(Position + Offs, 0);
            }
        }