By using the Gflags dialog box, you can perform all Gflags
functions from a user interface that lists all flags by name. There
is no need to look up flag abbreviations or hexadecimal values.
Instead, you can set and clear flags by selecting and clearing the
named flag check boxes.
Also, the dialog box provides access to the following features
that are not available from the command line:
Debugger. Specify that a particular program always runs in a
debugger.
Launch. Run a program with the specified debugging
settings.
Kernel Special Pool Tag. Detects kernel pool errors.
Image file settings affect instances of the specified program
that start after the command completes. They are saved in the
registry and remain effective until you change them.
In the Destination area, in the Image File Name
box, type the name of the executable file or DLL, including the
file name extension.
Click Image File Options.
Set or clear a flag by selecting or clearing the check box
associated with the flag.
When you have selected or cleared all the flags you want, click
Apply.
This feature runs a program once with the specified flags. These
settings affect only the instance of the program launched by the
instruction in the Command Line box. They are not saved in
the registry.
In the Destination area, in the Command Line box,
type a command to start a program, including program
parameters.
Set or clear a flag by selecting or clearing the check box
associated with the flag.
When you have selected or cleared all the flags you want, click
the Launch button.
Notes
Flags set in the registry do not affect the instance of the
program that is launched.
Flags set in the dialog box are used for the launched instance
even when they are not image file flags.
This feature configures the program so that it always runs in a
debugger with the specified options. This setting is saved in the
registry. It affects all new instances of the program and remains
effective until you change it.
The flags settings in the dialog box do not affect the debugger
run.
In the Destination area, in the Image File Name
box, type the name of the executable file, including the file name
extension.
Click Image File Options.
In the Image Debugger Options area, click the
Debugger check box.
In the Debugger box, type the command to run the
debugger, including the program name and parameters. For example,
ntsd -d.
The kernel special pool feature uses the special pool for all
allocations that have a specified tag or are within a specified
size range. This feature helps you to detect and identify the
source of errors in kernel pool use, such as writing beyond the
allocated memory space, or referring to memory that has already
been freed.
For information on using the special pool, see the Windows
Driver Development Kit.
Kernel special pool settings are saved in the registry. They
become effective when you restart the system and remain effective
until you change them.
In the Destination area, click System
Registry.
Choose one of the following methods:
To specify a pool tag in text format, click Text.
Type a four-character pattern for the tag. The tag can include
the ? (any single character) and * (multiple
characters) wildcard characters. For example, Fat* or Av?4.
Gflags converts the ASCII characters to their hexadecimal
format, placing the leftmost character in the lowest order
position. For example, if you type Tag1, Gflags sets the tag
to 0x31676154.
To specify a pool tag in hexadecimal format, click
Hex.
Type a hexadecimal value for the tag.
Gflags sets the tag to the same numeric value. For example, if
you type 12345678, Gflags stores pool tag 0x12345678.
Note
Enter a hexadecimal value that is greater than the page size of
the system. Otherwise, the value is interpreted as indicating a
size range.
To track kernel pool allocations of a specified size, click
Hex.
Allocations are organized into a range of pool block sizes. In
32-bit systems, pool blocks are divided into 8-byte ranges. In
64-bit systems, the range is 16 bytes.
To indicate a range, type a hexadecimal number equal to the
upper limit of the range + 8 bytes for the pool header. For
example, on a 32-bit system, to specify a pool block of between 9
and 16 bytes, type 18 to indicate 0x18.
The following table shows the pattern of pool block ranges and
the value you type to select that range for 32-bit systems.
Size range
(in bytes)
Value
0 - 8
0x10 (16)
9 - 16
0x18 (24)
17 - 24
0x20 (32)
25 - 32
0x28 (40)
...
The following table shows the pattern of pool block ranges and
the value you type to select that range for 64-bit systems.
Size range
(in bytes)
Value
0 - 16
0x18 (24)
17 - 32
0x28 (40)
33 - 48
0x38 (56)
49 - 64
0x46 (70)
...
Note
The value for a size range must be equal to a multiple of 8
plus 8 (8x + 8) on 32-bit systems or a multiple of 16 + 8 (16x + 8)
on 64-bit systems. Also, the value must be smaller than the page
size for the system. Otherwise, the value is interpreted as a
hexadecimal tag.
Click Verify Start or Verify End:
Verify End causes a system stop when a program tries to
access tagged memory beyond its memory allocation.
Verify Start causes a system stop when a program tries
to access tagged memory preceding its memory allocation.
Click Apply.
To disable kernel special pool, delete the text or hexadecimal
value from the Kernel Special Pool Tag box, and then click
Apply.
Note
The special pool can also be used for the memory pool
allocations requested by a specific driver. This feature is
activated by Driver Verifier (Verifier.exe), a tool included in the
Windows\System32 directory in Windows 2000 and Windows XP
. For details, see the Driver Verifier documentation in the Windows
Driver Development Kit (DDK).