Enables page heap with default settings. ProgramName is
the name of the program including the file extension.
/disableProgramName
Disables page heap. ProgramName is the name of the
program including the file extension.
/full
Specifies page heap for all allocations. Full-page heap
allocations are memory intensive and should only be used in
conjunction with a specified allocation range or DLL for
large-scale processes. For more information about the full-page
heap method, see Choosing a Method to
Investigate Heap Block Corruptions in PageHeap Notes.
/sizeSizeStartSizeEnd
Specifies PageHeap allocations for a size range.
SizeStart and SizeEnd are decimal integers.
/addressAddressStartAddressEnd
Allows page heap allocations only in blocks that are contained
in the stack trace, captured at the moment of allocation, and only
if the address also falls in the specified range of addresses.
AddressStart and AddressEnd specify the address range
to be searched on all allocation stack traces and are specified as
hexadecimal numbers in "C" syntax (that is, 0xAABBCCDD). This
parameter is not commonly used.
Note
The /address parameters works only on
x86 architectures and is not always reliable due to the
underlying stack trace capturing algorithms.
/dllsDLL
Allocates in full-page heap only if the request comes from
certain DLLs, and redirects all imports for the specified DLL to
page heap functions. DLL is the name of a binary file
including its file extension. The following imported functions are
redirected:
HeapAlloc/Free
GlobalAlloc/Free
LocalAlloc/Free
malloc/free
operator new/delete
operator new[ ]/delete[ ]
/randomProbability
Allows page heap to decide randomly if the allocation will be
made in full-page heap or in normal page heap. Probability
is a decimal integer from 0 through 100, representing the
probability of a full-page heap allocation, rather than a normal
heap allocation. Probability of 100 is the equivalent of
using the /full parameter. Probability
of 0 is the equivalent of using normal page heap.
Launches PageHeap under debugger "ntsd -g -G -d -x" and redirects debugger output to the kernel debugger if
there is one attached. This paremeter is not commonly used.
/backwards
Places a non-accessible page at the beginning of an allocation,
rather than the end of it. This enables PageHeap to find overruns
at the start of the buffer, instead of end buffer overruns. Use
/backwards only with the
/full parameter.
/unaligned
Directs page heap manager to ignore the 8-byte
alignment rule and always align the end of the allocation at a page
boundary. For more information, see Unaligned Allocations
in PageHeap Notes.
Note
Some applications make assumptions about 8-byte
alignment and will stop working correctly with the
/unaligned parameter. Internet Explorer is one
such example.
/decommit
Enables the use of the reserved virtual space feature, instead
of non-accessible committed pages, and therefore reduces memory
overhead. For more information, see Uncommitted Pages for
Full-Page Heap Allocations in PageHeap Notes.
/notraces
Specifies that no stack traces are collected.
/faultRate
[Timeout]
Simulates low memory conditions by introducing heap allocation
errors into the application being tested (fault injection).
Rate is an integer from 1 through 10000 representing the
probability that an allocation will fail. Timeout is the
number of seconds that fault injection is disabled after an
application starts. For more information, see Fault Injection in PageHeap
Notes.
/leaks
Checks for heap leaks when a process shuts down. The
/leaks parameter is effective only when normal
page heap is enabled (that is, not full-page heap). Therefore, when
the /leaks parameter is specified, all flags
that force full-page heap are disabled.
/protect
Protects heap internal structures. The
/protect parameter can be used to detect random
corruptions, but will slow execution.
/no_sync
Checks for unsynchronized access and causes page heap to break
if it detects that a heap created with HEAP_NO_SERIALIZE flag is
accessed from different threads. Do not use this flag for a process
that has its own custom heap manager (for example, MPheap process).
If a process has a custom scheme to synchronize access then this
parameter will give false positives.
Notes
When run without options, PageHeap will print all page heap
enabled applications and their specific options.
Enabling page heap does not affect any processes that are
already running. If you need to use page heap for a process that is
already running and cannot be restarted (for example csrss.exe or
winlogon.exe), then you must restart your computer after page heap
has been enabled for that process.
Page heap manager supports multiple simultaneous parameters.
The following command is an example of this: pageheap /enable iexplore.exe
/dlls jscript.dll vbscript.dll /size 40
56 /random 3
This command allocates in full-page heap all allocations made by
iexplore.exe in jscript.dll or vbscript.dll, plus all blocks in
range 40-56 bytes, and all other allocations with a
probability of 3 percent.
If you try to use conflicting parameters, then PageHeap will
give you an error message that a parameter has been disabled
because of incompatibility with another parameter.