Debugging Tools for Windows

Example 3: Setting a Flag by Using Its Hexadecimal Value

The following command sets the system-wide Enable page heap flag. Enable Page Heap adds a guard page and other tracking features to each heap allocation.

The command uses the /r parameter to indicate system-wide registry mode. To identify the flag, the command uses 2000000, which represents 0x2000000, the hexadecimal value for Enable page heap.

Although the command sets a flag, it omits the plus (+) sign. When using hexadecimal values, the sign is optional and add (+) is the default.

gflags /r 2000000 

In response, GFlags displays the system-wide flags set in the registry. The display indicates that the command is successful. The Enable page heap feature will be enabled for all processes when Windows restarts.

Current Boot Registry Settings are: 02000000
    hpa - Enable page heap

Build machine: CAPEBUILD