Table A-1 shows the data types and how they are represented.
Table A-1 Storage Allocation for Data Types
Data Type |
Internal Representation |
---|---|
char elements |
A single 8-bit byte aligned on a byte boundary. |
short integers |
Halfword (two bytes or 16 bits), aligned on a two-byte boundary |
int and long |
32 bits on v8 (four bytes or one word), aligned on a four-byte boundary 64 bits on v9 (four bytes or one word) aligned on an eight-byte boundary) |
(SPARC) 64 bits (eight bytes or two words), aligned on an eight-byte boundary (Intel) 64 bits (eight bytes or two words), aligned on a four-byte boundary |
|
float |
32 bits (four bytes or one word), aligned on a four-byte boundary. A float has a sign bit, 8-bit exponent, and 23-bit fraction. |
double |
64 bits (eight bytes or two words), aligned on an eight-byte boundary (SPARC) or aligned on a four-byte boundary (Intel). A double element has a sign bit, an 11-bit exponent and a 52-bit fraction. |
long double |
v8 (SPARC) 128 bits (16 bytes or four words), aligned on an eight-byte boundary. A long double element has a sign bit, a 15-bit exponent and a 112-bit fraction.
v9 (SPARC) 128 bits (16 bytes or four words), aligned on a 16 byte boundary. A long double element has a sign bit, a 15-bit exponent and a 112-bit fraction.
(Intel) 96 bits (12 bytes or three words) aligned on a four-byte boundary. A long double element has a sign bit, a 16-bit exponent, and a 64-bit fraction. 16 bits are unused. |