ILP32 and LP64 data models and data type sizes

Table 1 compares data models and data type sizes of ILP32 and LP64 environments.
Table 1. Comparison of ILP32 and LP64 data models
ILP32 (32-bit environment) LP64 (64-bit environment)
Data model ILP32 (32-bit pointer) Data model LP64 (64-bit pointer)
int, long, ptr, and off_t are all 32 bits (4 bytes) in size. int is 32 bits in size. long, ptr, and off_t are all 64 bits (8 bytes) in size.

The 32-bit data model for z/OS XL C/C++ compilers is ILP32 plus long long. This data model uses the 4/4/4 data type size model and includes a long long type. Table 2 compares the type sizes for the different models.

LP64 is the 64-bit data model chosen by the Aspen working group (formed by X/OPEN and a consortium of hardware vendors). LP64 is short for long-pointer 64. It is commonly referred to as the 4/8/8 data type size model and includes the integer/long/pointer type sizes, measured in bytes.

Table 2. ILP32 and LP64 type size comparisons for signed and unsigned data types
Data Type 32-bit sizes (in bytes) 64-bit sizes (in bytes) Remarks
char 1 1  
short 2 2  
int 4 4  
long 4 8  
long long 8 8  
float 4 4  
double 8 8  
long double 16 16  
pointer 4 8  
wchar_t 2 4 Other UNIX platforms usually have wchar_t 4 bytes for both 32-bit and 64-bit mode.
size_t 4 8 This is an unsigned type.
ptrdiff_t 4 8 This is a signed type.