Arm32 and Arm64 data types memory representation size memo

 

To summarize the changes:

  • The size of pointers increased from 4 bytes to 8 bytes.

  • The size of long integers increased from 4 bytes to 8 bytes. The size_tCFIndex, and NSInteger types also increased from 4 bytes to 8 bytes.

  • The alignment of long long integers and the data types based on it (fpos_toff_t) has increased from 4 bytes to 8 bytes. All other types use the natural alignment, meaning that data elements within a structure are aligned at intervals corresponding to the width of the underlying data type.

Table 1-2 shows the floating-point types commonly used in iOS and OS X. Although the built-in data types do not change in size, in the 64-bit runtime the CGFloat type changes from a float to a double, providing a larger range and accuracy for these values in Quartz and in other frameworks that use the Core Graphics types. (Floating-point types always use natural alignment.)

The 64-bit ARM environment uses a little-endian environment; this matches the 32-bit iOS runtime used by devices with ARM processors that support the ARMv7 architecture.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325340028&siteId=291194637