Page heap enhancements included with Windows 2000 Service Pack 1

Article translations Article translations
Article ID: 267802 - View products that this article applies to.
This article was previously published under Q267802
This article has been archived. It is offered "as is" and will no longer be updated.
Expand all | Collapse all

On This Page

Summary

This article describes the additional page heap features in Windows 2000 Service Pack 1 that you can use for advanced debugging.

More information

Windows 2000 Service Pack 1 includes the following types of page heap.

Normal Page Heap

This functionality remains the same; an allocation is examined when it is freed. You can enable normal page heap by using the regular syntax. For example, type pageheap /enable program at a command prompt.

Full Page Heap

This functionality catches problems sooner by placing inaccessible pages at the end of an allocation. However, this method uses a lot of memory because every allocation uses at least one page of memory. You can enable full page heap by using the /full switch. For example, type pageheap /enable program /full at a command prompt.

You can enable full page heap on a per-DLL basis; this is helpful in further isolating an overwrite when full page heap is required. Full page heap uses too many resources when you use it on the whole process. For example, the following command causes the listed DLLs to have full page heap, while the rest of the process (including Iexplore.exe and the remaining DLLs) get normal page heap:
pageheap /enable iexplore.exe /dlls ole32.dll mshtml.dll jscript.dll
The following page heap switches have also been added:
  • /Size: Specifies the amount of memory to be used by page heap. The command syntax is:
    pageheap /enable imagename /full /size startend
    Imagename is the name of the image, and start and end are the closed size interval in bytes (decimal) for blocks to be allocated in page heap.

  • /Address: Specifies the address range for page heap allocations. The command syntax is:
    pageheap /enable imagename /full /address startend
    Imagename is the name of the image, and start and end is the address range to be searched on all allocation stack traces in C-style hexadecimal notation, such as 0xabcdef00.

  • /Random: Specifies the random page heap allocations. The command syntax is:
    pageheap /enable imagename /full /random probability
    Imagename is the name of the image, and probability is a decimal number between 0 and 100 that represents the probability used to determine whether the allocation is going to be made in full page heap. A value of 100 is the equivalent of the /full switch, and a value of 0 is normal page heap.

  • /Backwards: Used to detect a backward overrun, which places a non-accessible page at the beginning of an allocation, as opposed to the end. The command syntax is:
    pageheap /enable /full /backwards
  • /Unaligned: Used for unaligned allocations, and prevents the usage of a "fill pattern" to align allocations to pages. Many programs, such as Microsoft Internet Explorer, make certain assumptions about the alignment and do not work with this switch. The command syntax is:
    pageheap /enable imagename /full /unaligned
    Imagename is the name of the image.

  • /Decommit: Specifies uncommitted pages for full page heap allocations. This switch has the same effect as the /full switch by itself, but it uses less memory. Instead of using a whole page for the beginning and end of an allocation, it simply reserves virtual space. The access violation is the same, and this method can replace the current /full page heap switch. The command syntax is:
    pageheap /enable imagename /full /decommit
    Imagename is the name of the image.

Properties

Article ID: 267802 - Last Review: October 26, 2013 - Revision: 4.0
Applies to
  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Professional Edition
Keywords: 
kbnosurvey kbarchive kbenv kbinfo KB267802

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com