fpt and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Ref Manual Home |

ALIGNMENT GRANULARITY

Syntax:

ALIGNMENT GRANULARITY [:] <integer> [BYTE[S]]

Function:

Most systems access memory more efficiently if objects occupy aligned addresses, addresses which are multiples of 4 or 8 bytes. The command ALIGNMENT GRANULARITY specifies the spacing of aligned addresses for local variables and for variables in COMMON blocks. The command STRUCTURE ALIGNMENT GRANULARITY specifies the spacing of aligned addresses of the fields within Fortran structures. The alignment rules used by most compilers, and by fpt, are that:

Where to Use this Command

Operating system command line Yes
Configuration file, config.fsp Yes
Specification (fsp) files, *.fsp Yes
Interactively, to FPT> prompt No
Interactive command files No
Embedded in the Fortran code No

Note that the alignment granularity used by the command ALIGN OBJECTS IN COMMON BLOCKS cannot be specified interactively because addresses within COMMON blocks are computed before fpt enters interactive mode.

Default

ALIGNMENT GRANULARITY : 4 BYTES

Examples:

In an FSP file for Compaq Visual Fortran under Windows 7:

%alignment granularity: 8 %check alignment

See Also:

ALIGN OBJECTS IN COMMON BLOCKS

CHECK ALIGNMENT

Copyright ©1995 to 2018 Software Validation Ltd. All rights reserved.