5.7.2 C*$* storage order (var-list)

The storage order directive specifies the relative order that storage should be allocated for the listed routine-local variables and arrays. By appropriately positioning the arrays, cache collisions can be reduced. If the compiler does not interpret the storage order directive, a loss of performance results, but the program will nonetheless generate the correct results.

The rules governing the use of the C*$* storage order directive are the following:

To interpret a C*$* storage order directive, the compiler must place the named objects in memory in the order listed. This is the same order as they would be placed in a COMMON block. Thus, on a machine with 4 bytes per REAL variable:

   C*$* storage order (A1,A2,A3)
      REAL A1(100), A2(3), A3(200)

 A1 would be placed at some address (for example, address X)
 A2 would be placed at X+100*4
 A3 would be placed at X+100*4+3*4

Both static and stack-based storage schemes are allowed, as long as all of the objects in a single storage order directive are placed in the same scheme.


Previous Page | Next Page | Contents | Index |
Command-Line Qualifiers