Computer Science, asked by ssusur9453, 5 months ago

5675 data type alignment

Answers

Answered by kulkarninishant346
2

Answer:

Documentation Home > FORTRAN 77 Language Reference > Chapter 2 Data Types and Data Items > Types > Size and Alignment of Data Types

FORTRAN 77 Language Reference

Previous: Properties of Data Types

Next: Constants

Size and Alignment of Data Types

Storage and alignment are always given in bytes. Values that can fit into a single byte are byte-aligned.

The size and alignment of types depends on various compiler options and platforms, and how variables are declared. The maximum alignment in COMMON blocks is to 4-byte boundaries.

Default data alignment and storage allocation can be changed by compiling with special options, such as -f, -dalign, -dbl_align_all, -dbl, -r8, -i2, and -xtypemap. The default descriptions in this manual assume that these options are not in force.

Refer to the Fortran User's Guide for details of specific compiler options.

The following table summarizes the default size and alignment, ignoring other aspects of types and options.

Table 2-1 Default Data Sizes and Alignments (in Bytes)

Fortran 77 Data Type

Size

Default Alignment

SPARC x86

Alignment in COMMON

SPARC x86

BYTE X

CHARACTER X

CHARACTER*n X

1

1

n

1

1

1

1

1

1

1

1

1

1

1

1

COMPLEX X

COMPLEX*8 X

DOUBLE COMPLEX X

COMPLEX*16 X

COMPLEX*32 X

8

8

16

16

32

4

4

8

8

Similar questions