Dynamic array memory layout (Win32 only) Offset Contents -8
32-bit reference-count
-4
32-bit length indicator (number of elements)
0..Length * (size of element) -1 array elements
On the .NET platform, dynamic arrays and open array parameters are implemented using the System.Array type.
As with static arrays, memory layout is therefore determined by the System.Array type.
Record Types On the .NET platform, field layout in record types is determined at runtime, and can vary depending on the
architecture of the target hardware. The following discussion of record alignment applies to the Win32 platform only
(packed records are supported on the .NET platform, however).
When a record type is declared in the
{$A+}
state (the default), and when the declaration does not include a packed
modifier, the type is an unpacked record type, and the fields of the record are aligned for efficient access by the
CPU. The alignment is controlled by the type of each field and by whether fields are declared together. Every data
type has an inherent alignment, which is automatically computed by the compiler. The alignment can be 1, 2, 4, or
8, and represents the byte boundary that a value of the type must be stored on to provide the most efficient access.
The table below lists the alignments for all data types.