您的位置:首页 > 运维架构 > Linux

Lengths of Primitive Java and C++ Data Types on Linux and Windows 32-bit/64-bit (Linux和Windows上Java和C++基本数据类型的长度对比32位/64位)

2011-05-11 05:08 1461 查看
C++ 基本数据类型

数据类型  LP64   ILP64   LLP64   ILP32   LP32
char     8    8     8     8     8
short    16    16    16    16    16
_int32   N/A    32    N/A    N/A    N/A
int     32    64    32    32    16
long     64    64    32    32    32
long long  N/A   N/A    64    N/A    N/A
pointer   64    64    64    32    32

Linux 32 --- ILP32

Linux 64 ---- LP64

Windows 32 ---- ILP32

Windows 64 ----- LLP64

C++: to conclude: from 32 to 64, Windows changes lengths of pointers only, while Linux changes lengths of long and pointers.

_________________________________________________________________

Java++ 基本数据类型

数据类型   Length(LInux/Windows/32/64)
char     8  

byte   8

boolean 8
short    16   
int     32   
float 32

long     64

double 64    

Java: to conclude: Not a change at all.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: