Data Model

The data model refers to the size of the integer, long, and pointer data types. On 32-bit architectures, the data model is typically ILP32, where integers, longs, and pointers are 32-bits. On 64-bit architectures, the data model is typically LP64, where longs and pointers are 64-bits, but integers are 32-bits.

The ANSI C standard is architecture neutral, so it does not specify the size of these data types. It only requires that integers and short integers be at least 16 bits, and that long integers be at least as long as integers and not less than 32-bits.

Since the Linux kernel can be compiled and executed on many different architectures, it is important to be aware of how the data model can affect the portability of software from one architecture to another. In particular:

In the POSIX standard and also in the Linux kernel many uses of integers and long integers have been replaced with new data types. This clarifies the use of the variables, improves error checking by the compiler, and is generally considered good programming practice. In addition, it improves architecture neutrality because it localizes the dependency on the data model.