FPT and WinFPT Reference Manual - Command-line Commands
| SimCon Home | Reference Manual Home |
Syntax:
STRUCTURE 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 STRUCTURE ALIGNMENT GRANULARITY specifies the spacing of aligned addresses of components of sequence derived types and of fields of structures. The command ALIGNMENT GRANULARITY specifies the spacing of aligned addresses of local variables and of variables in COMMON blocks. The alignment rules used by most compilers, and by FPT, are that:
the alignment granularity of a logical, integer or real field is the data size of the field, or the structure alignment granularity, whichever is the smaller;
the alignment granularity of a complex field is the data size of the real data specification with the same precision, or the structure alignment granularity, whichever is the smaller;
the alignment granularity of fields which are character variables and arrays is one byte, but access is more efficient if variables and array elements start on aligned addresses;
the alignment granularity of a record or of a user-defined compound type is the granularity of the largest object in the structure or type, or the structure granularity, whichever is the smaller.
Where to use this command:
|
for checking alignment |
for 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 |
Default:
STRUCTURE ALIGNMENT GRANULARITY : 4 BYTES
See also:
Copyright ©1995 to 2014 Software Validation Ltd. All rights reserved.