This switch sets the code alignment. It takes an argument which specifies the alignment for a particular kind of code generated by the compiler. The general form is
{$CODEALIGN PARAM=VALUE}
Where PARAM is the parameter to tune, and VAR value is a numerical value specifying an alignment. PARAM can be one of the following strings:
Set the alignment for procedure entry points.
Set the alignment for jump destination locations.
Set alignment for loops (for, while, repeat).
Minimum alignment for constants (both typed and untyped).
Maximum alignment for constants (both typed and untyped).
Minimum alignment for static and global variables.
Maximum alignment for static and global variables.
Minimum alignment for local variables.
Maximum alignment for local variables.
Minimum alignment for record fields.
Maximum alignment for record fields.
By default the size of a data structure determines the alignment:
A SmallInt will be aligned at 2 bytes.
A LongInt will be aligned at 4 bytes.
A Int64 will be aligned at 8 bytes.
With the above switches the minimum required alignment and a maximum used alignment can be specified. The maximum allowed alignment is only meaningful if it is smaller than the natural size. i.e. setting the maximum alignment (e.g. VARMAX) to 4, the alignment is forced to be at most 4 bytes: The Int64 will then also be aligned at 4 bytes. The SmallInt will still be aligned at 2 bytes.
These values can also be specified on the command line as
-OaPARAM=VALUE