https://blog.csdn.net/waitingbb123/article/details/80504093
如果我们将0x1234abcd写入到以0x0000开始的内存中,则结果为;
address big-endian little-endian
0x0000 0x12 0xcd
0x0001 0x34 0xab
0x0002 0xab 0x34
0x0003 0xcd 0x12
注:每个地址存1个字节,2位16进制数是1个字节(0xFF=11111111);
static inline int __is_little_endian()
{
int n = 1;
return (*(char*)&n) == 1;
}