转自:https://msdn.microsoft.com/en-us/library/windows/hardware/ff543094(v=vs.85).aspx
The following commands enable full and standard page heap verification for myapp.exe, a fictitious program.
The first command enables standard page heap verification for myapp.exe. It uses the /p parameter to enable page heap for a process. By default, /p enables standard page heap.
gflags /p /enable myapp.exe
The following commands enable full page heap verification for the myapp.exe program. Although these commands create different settings in the registry, they are all functionally equivalent to selecting the Enable page heap check box for the myapp.exe image file in the Global Flags dialog box. These methods can be used interchangeably.
gflags /p /enable myapp.exe /full gflags /i myapp.exe +hpa gflags /i myapp.exe +02000000
The following commands disable full or standard page heap verification for the myapp.exe program, regardless of the command or dialog box method used to enable page heap verification.
gflags /p /disable myapp.exe gflags /i myapp.exe -hpa gflags /i myapp.exe -02000000