32、ILP64、LP64、LLP64、64位系統
Data Type ILP32 ILP64 LP64 LLP64
char 8 8 8 8
short 16 16 16 16
int 32 64 32 32
long 32 64 64 32
long long 64 64 64 64
pointer 32 64 64 64
在網上查資料,還看到一個LP32(long point 64)模型,就是int是16位的。
這個從來沒有用到過。
絕大部分64位的Unix,linux都是使用的LP64模型;
64位的Windows使用的是LLP64(long long and point 64)模型。
另外,在網上看到一個資料:
float 都是4字節;
double 都是8字節;(C中直接寫小數,默認是double型)