9.5.2 The LocalWalk Commands

You can choose the LocalWalk command from the Object menu to view the local heap for a selected object. You can also choose the GDI LocalWalk or User LocalWalk command to view the GDI or USER local heap, respectively, at any time. Local Walk windows show the following information:

Window heading Information displayed

OFFSET Offset of the object from the beginning of the heap. You can use this information to locate the contents of the object within the hexadecimal display of the heap.
HANDLE Handle of the object.
SIZE Size of the object, in bytes.
FLAGS Whether the object is movable, fixed, or free.
LCK Lock count for the object.
TYPE Object type (shown only for GDI and USER heaps).

The following illustration shows a Local Walk window.

Windows allocates the first object in the local heap, so there are always at least two objects in a local heap.

9.5.2.1 Local Walk: The Heap Menu

Following are the commands on the Heap menu:

Command Action

Info Displays a message box showing the number of free, movable, and fixed objects; the number of bytes they use; the total number of allocated objects; and the number of bytes they use.
Save Saves the Local Walk display to a file. The first file saved is named HWL00.TXT; subsequent files are numbered sequentially (HWL01.TXT, HWL02.TXT, and so on). The file contains all the information shown in the Local Walk window and a summary of local objects by type (free, movable, fixed, and total allocated).

9.5.2.2 Local Walk: The Sort Menu

Following are the commands on the Sort menu:

Command Action

Address Sorts the Local Walk display numerically by address.
Flags Sorts the Local Walk display alphabetically by flags (fixed, free, or movable).
Size Sorts the Local Walk display numerically by object size.

9.5.2.3 Local Walk: The Add! Menu

The Add! menu displays a message box showing the total number of bytes used by selected objects.