Delphi Language Guide Delphi for Microsoft Win32 Delphi for the Microsoft. Net framework


Dynamic array memory layout (Win32 only)



Yüklə 0,84 Mb.
Pdf görüntüsü
səhifə251/294
tarix02.01.2022
ölçüsü0,84 Mb.
#41395
1   ...   247   248   249   250   251   252   253   254   ...   294
DelphiLanguageGuide

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.

Yüklə 0,84 Mb.

Dostları ilə paylaş:
1   ...   247   248   249   250   251   252   253   254   ...   294




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©azkurs.org 2024
rəhbərliyinə müraciət

gir | qeydiyyatdan keç
    Ana səhifə


yükləyin