IT lexicon › Programming › LP64 (data models)

LP64 (data models)

Programming På svenska → Updated: 2026-11-07

The agreement on how wide int, long and pointers are — and the reason the same C code behaves differently on Linux and Windows.

The C standard only promises that long is at least as big as int, so when 64-bit processors arrived every platform had to pick. The letters name what is 64 bits wide: in ILP32 int, long and pointers are all 32 bits; in LP64 long and pointers grow to 64 while int stays put; in LLP64 only long long and pointers get bigger. The Unix vendors settled on LP64 in the mid-1990s, and Linux, macOS, the BSDs and Solaris all use it.

Microsoft went with LLP64 for 64-bit Windows, because the Win32 API was full of structures that assumed long was 32 bits. The upshot is that long is the least portable integer type in the language, and anyone who stashes a pointer in one has written a bug that only shows up on one platform. ILP64, where even int is 64 bits, survived mostly on certain Cray systems.

← Back to the lexicon