Copyright: (c) 1992 Borland International


HeapSpy Help Contents

MENU COMMANDS:

Heap

Sort

Classes

Options

Object

Window


Application customization
Options

The Options menu allows for customization of HeapSpy.  Global preferences can be specified as well as the fonts used in the display of lists and hex dumps.  The menu items presented are:

Preferences

Hex Font

List Font


Font cusomization
Options | Hex Font/List Font

Selecting these menu entries will allow one to specify the font that is used when HeapSpy creates "list" type windows or "hex dump" windows.  For formatting purposes, selection is limited to fixed pitch fonts.


Heap display selections
Heap

The Heap menu allows the selection of various ways to display heap usage.  The options presented are:

Select Module	Display Global Heap entries on a module by module basis.

Free	Display Global Heap entries marked as free

All	Display all global heap entries.

Usage Graph	Display Global Heap usage in a graphical manner

User Local Walk 	Display the Local heap for the USER module.

GDI Local Walk 	Display the Local heap for the GDI module.

Memory Info	Display the status of the virtual memory manager.

Save As 	Save the current list of heap entries to a file.

Exit 	Terminate this application


Sorting the heap
Sort

The Sort menu option allows you to specify the ordering of the heap entries in a heap list window.  The available sort options are:

Address	Ordered by linear address for global heap lists, by offset with the data segment fort local heaps
Handle	Ordered by the handle assigned tby Windows to this memory object
Size	Ordered by the size of the heap block; from smallest to largest
Type	Ordered based on the type of the object.  The ordering is based on the numeric value of the type.
Module	For heap lists that consist of multiple modules, the lists is ordered by module.


Global program options
Options | Preferences

The Options dialog allows you to set various application wide defaults that effect the operation of HeapSpy.  The defaults consist of:

Display Options

Rebuild list on activation

Checking this option will cause HeapSpy to rescan the heap, rebuilding the list of heap entries whenever the window containing the list is made active.

Enable SpeedBar

Checking this option will cause HeapSpy to create a row of buttons below it's menu.  This row of buttons, known as a "SpeedBar" allows one to make menu selections visually rather than traversing the menu itself.

Window Tiling

This preference tells HeapSpy how to tile it's windows when the Window|Tile menu entry is selected

Default Ordering

This group of radio buttons establishes the default ordering of a list of heap entries in a window.  See the Sort menu entry for an explanation of each button


Display Current window classes
Classes

Selecting this menu entry will create a window that lists all of the window classes that currently exist.  The class list differentiates global window classes and application specific classes by enclosing the owning module of global classes with brackets.  Application specific classes are displayed in the form <Module>.<class name>.

Double clicking on a class list entry will cause a dialog box containing detailed information about the class to be displayed.


Display single heap entry
Object

This menu entry is used to display the currently selected heap list entry in a detailed manner.  The sub-menu entries that can be selected are:

Hex Dump	Creates a new window containing a raw hexadecimal dump of the data.
Formatted Dump	Creates a new window containing the data in a formatted fashion.  Currently the only data that can be formatted is a "Resource_Bitmap" heap entry.
Local Walk	Creates a new window containing a list of local heap entries.  A global heap entry that contains a local heap (an entry with an "H" flag) or a TPW Heap block are  "walkable".

A right click of the mouse on the heap entry that is capable of either having a local walk or formatted dump will perform the same function as selecting the

Local Walk or Formatted Dump menu entries.


MDI child window management
Window

The Window menu entry contains functions commonly found in MDI applications.  There are also functions specific to HeapSpy.

The Tile function rearranges the open windows so that they fit within the

application desktop without being overlapped.  The Tile function can arrange the windows in either a horizontal or vertical orientation.  The orientation can be specified in the Option|Preferences dialog.

The Cascade function causes the open windows to overlap so that each title bar is visible

The Arrange Icons function will arrange the icons of all minimized windows evenly across the bottom of the application desktop,

The Close Window function will close the currently active window on the application desktop.

The Close All function will close ALL of the windows that currently exist on the application desktop.

The Rebuild Window function will scan memory and recreate the information

contained in the currently active window.  In addition to manual requesting a window rebuild, HeapSpy has the option to rebuild a window whenever it is activated.  This option can be turned on or off in the Options|Preferences dialog.


Virtual Memory manager information
Heap | Memory Info

The Memory Info dialog box displays various values describing the state of the virtual memory manager.  If Windows is running in standard mode, the only valid value is the Largest Free Block item.

Member	Description

Largest Free Block	Specifies the largest free block of contiguous linear memory in the system, in bytes.

Max Pages Available	Specifies the maximum number of pages that could be allocated in the system (the value of LargestFreeBlock divided by the value of PageSize).

Max Pages Lockable	Specifies the maximum number of pages that could be allocated and locked.

Total Linear Space	Specifies the size of the total linear address space, in pages.

Total Unlocked Pages	Specifies the number of unlocked pages in the system.  This value includes free pages.

Free Pages	Specifies the number of pages that are not in use.

Total Pages	Specifies the total number of pages the virtual-memory manager manages. This value includes free, locked, and unlocked pages.

FreeLinearSpace	Specifies the amount of free memory in the linear address space, in pages.

Swap File Pages	Specifies the number of pages in the system swap file.

Page Size	Specifies the system page size, in bytes.


Heap Module Selection
Heap | Select Module

The Select Module dialog box displays a list of the currently loaded modules, allowing for the display of the heap entries for the selected module.  Double clicking on the selected list entry or pressing the OK button while a list entry is selected will cause a window to be created showing the heap entries for that module.

In addition to module selection, this dialog box supports two other functions.  Pressing the "Info" button while a list box entry is selected will cause a dialog box to be displayed giving a brief summary of the memory usage of that module.

Pressing the "Unload Module" button will cause the selected module to be removed from memory. USE THIS BUTTON WITH GREAT CAUTION.  It's a very handy feature for DLLs that have become widowed (ie:  a programming error caused the app which loaded the DLL to terminate leaving the DLL loaded).  It's possible to hang Windows if you unload the wrong module.