FPT and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Reference 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:


Checking alignment

Forcing alignment

Operating system command line

Yes

Yes

Configuration file, config.fsp

Yes

Yes

Specification (FSP) files, *.fsp

Yes

Yes

Interactively, to FPT> prompt:

Yes

No

Interactive command files

Yes

No

Embedded in the Fortran code

Yes

Yes

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 NT:

%alignment granularity: 8

%check alignment

See also:

ALIGN OBJECTS IN COMMON BLOCKS

CHECK ALIGNMENT


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