Rediger

Del via


Using the Global Flags Utility

The Global Flags (gflags.exe) utility provides a simple method of setting certain keys within the system registry, adjusting the kernel settings of the running system, and altering the settings for image files. You can set these keys by using a graphical or command-line interface.

The Global Flags utility can be found in the Windows Support Tools package and in the Debugging Tools for Windows package. For information about the latter, see Windows Debugging.

The Global Flags utility can also be used to configure the Special Pool option of Driver Verifier, or to designate the special pool for use in individual memory allocations.

To alter the Special Pool settings, start the Global Flags utility and select the System Registry option button in the Destination section. The Kernel Special Pool Tag section of the dialog box allows certain special pool options to be set.

Controlling Pool Tag Alignment

Select the Verify Start option button to cause the special pool alignment to focus on underrun detection. Select the Verify End option to focus on overrun detection. These buttons control the alignment of all special pool assignments -- whether made by Driver Verifier or by Global Flags.

Using Special Pool by Pool Tag or Allocation Size

Special pool can be used for all allocations with a certain pool tag. To activate this feature, enter the pool tag into the Pool Tag text box.

Special pool can also be used for all allocations in a certain size range. Although this use of special pool does not involve pool tags, this feature is nonetheless activated by entering a number into the Pool Tag text box. This number must be less than PAGE_SIZE.

For an x86 processor, PAGE_SIZE is 0x1000 and the allocation size ranges are 8 bytes in length. To activate special pool for all allocations with sizes in this range, enter a number equal to the maximum of this range plus 8. (This number is always a multiple of 8.) The following table illustrates these values:

Size range Enter this number in the Pool Tag text box

1 to 8 bytes

16 (0x10)

9 to 16 bytes

24 (0x18)

17 to 24 bytes

32 (0x20)

...

...

0xFE9 to 0xFF0 bytes

0xFF8

For an x64 processor, PAGE_SIZE is 0x1000 and the allocation size ranges are 16 bytes in length. To activate special pool for all allocations with sizes in this range, enter a number equal to the maximum of this range plus 16. (This number is always a multiple of 16.) The following table illustrates these values:

Size range Enter this number in the Pool Tag text box

1 to 16 bytes

32 (0x20)

17 to 32 bytes

48 (0x30)

33 to 48 bytes

64 (0x40)

...

...

0xFD1 to 0xFE0 bytes

0xFF0

For an Itanium-based processor, PAGE_SIZE is 0x2000 and the allocation size ranges are 16 bytes in length. To activate special pool for all allocations with sizes in this range, enter a number equal to the maximum of this range plus 16. (This number is always a multiple of 16.) The following table illustrates these values:

Size range Enter this number in the Pool Tag text box

1 to 16 bytes

32 (0x20)

17 to 32 bytes

48 (0x30)

33 to 48 bytes

64 (0x40)

...

...

0x1FD1 to 0x1FE0 bytes

0x1FF0

It is best to avoid using pool tags lower than PAGE_SIZE. For example, if you put 0x30 into this text box on an Itanium-based processor, special pool will be used for all allocations between 17 and 32 bytes in size, and for allocations with the pool tag 0x0030.

Note   If Driver Verifier has enabled the special pool for a driver and the Global Flags utility has enabled the special pool for a pool tag or allocation size, the special pool will be used for all allocations meeting any of these criteria (subject to pool availability).

See Special Pool for full details on the use of the special pool.