Walkthrough - Taking Snapshots (Memory Profiling)

Related Topics

The second step in profiling the memory usage of your .NET managed program is to take snapshots of memory profiling data as you exercise your code.

Snapshots give you a "before" and "after" record of your program's activities and memory usage, which you can compare and examine in the memory profiling data analysis views.

To create meaningful snapshots:

1.    After your program has completed its initialization procedures, click images\snapic.gif in the Purify toolbar. Purify takes a snapshot of the current memory profiling data, and creates a snapshot run entry images\navsnap.gif in the Navigator. This snapshot is your baseline for investigating how your program uses memory as it runs.

2.    Run your program through its routines, and watch the memory allocation graph in the Purify Data Browser for variations in memory use. If you see a large increase, click images\gctool.gif to force a garbage collection. If the graph does not show a significant decrease in the amount of allocated memory, take a second snapshot to compare with the previous snapshot.

Notes:

§      You can save a snapshot dataset to a Purify memory profiling file (.pmy) or to an ASCII text file (.txt).

(C) Copyright IBM Corporation 1992, 2010.