> $G: Group Unit Segments Directive


  $G:  Group Unit Segments Directive

Specifies the groups of units you want the linker to place in the same segment.

   Syntax:        {$G UnitName, UnitName ...}
   Type:          Local


Windows and Protected mode


The $G directive specifies the groups of units you want the linker to place in the same segment. Grouping units in the same segment ensures that the units swap in and out of memory at the same time. The $G directive is primarily used to group units containing discardable code.

Each $G directive specifies a group of units. $G directives are only valid in a program or library, and must appear after the program or library's uses clause. The compiler reports an error if you attempt to add a unit to more than one group. In addition to any groups created with $G, the compiler maintains a default group that includes all units not explicitly grouped.

The linker minimizes the number of code segments in an executable file by combining all units that belong to the same group. Two or more units are put into the same code segment if they belong to the same group and have the same code segment attributes, and if the combined size does not exceed the preferred segment size.

The linker will never put units that belong to different groups in the same code segment.

See Also


 К началу страницы 
Тэги: $G

Код для вставки: :: :: :: ГОСТ ::
Поделиться: //

Хостинг предоставлен компанией "Веб Сервис Центр" при поддержке компании "ДокЛаб"