Example #1
0
        public override void Set3ByteInt(long index, int offset, int value)
        {
            long address = address(index, offset);

            UnsafeUtil.putShort(address, ( short )value);
            UnsafeUtil.putByte(address + Short.BYTES, ( sbyte )(( int )(( uint )value >> (sizeof(short) * 8))));
        }
Example #2
0
 private void PutShort(long p, short value)
 {
     if (UnsafeUtil.allowUnalignedMemoryAccess)
     {
         UnsafeUtil.putShort(p, value);
     }
     else
     {
         UnsafeUtil.putShortByteWiseLittleEndian(p, value);
     }
 }