System derived types, such as size_t, should be used where possible so that the resulting variables make sense when passed between functions. The new derived types uintptr_t or intptr_t should be used as the integral type for pointers.
Fixed-width integer types are useful for representing explicit sizes of binary data structures or hardware registers, while fundamental C language data types, such as int, can still be used for loop counters or file descriptors.
Some system derived types represent 32-bit quantities on a 32-bit system but represent 64-bit quantities on a 64-bit system. Derived types that change size in this way include:
clock_t: relative time in specified resolution
bufcall_id_t: bufcall(9F) id
daddr_t: disk block address
intptr_t: integral pointer type
off_t: file offset
size_t: size of an object
ssize_t: size of an object or -1
time_t: time of day in seconds
timeout_id_t: timeout(9F) handler id
uintptr_t: unsigned integral pointer type
Drivers that use these derived types should pay particular attention to their use, particularly if they are assigning these values to variables of another derived type, such as a fixed-width type.