What are the differences in the length of 32-bit and 64-bit data types in Linux?

  
                

We all know that Linux systems have 32-bit and 64-bit machines, so what are the differences between them? Today Xiaobian gives you a comparison of the basic data type lengths of Linux 32-bit machines and 64-bit machines, so that you have an understanding, let's take a look.

basic data types

int length can be specified:

Similarly, there uint32_t and uint64_t

Other types of data

1, size_t: the same as the machine word length;

2, off_t: 32-bit machine default is 32-bit long, then you can not operate on files larger than 4G, then Off_t = __off_t; If you want to perform a file offset operation greater than 4G, you can define the

before adding the header file to the program. Off_t = __off64_t, specifically defined in unistd.h; for 64-bit machines, the default It is 64 bits long.

#define _FILE_OFFSET_BITS 64

3,ino_t: Same as the machine word length.

The above is the difference between the basic data type length of 32-bit machine and 64-bit machine under Linux. It is easy to see from the table that there is no difference between 32-bit and 64-bit data. You understand ?

Copyright © Windows knowledge All Rights Reserved