Finding memory leaks

Command-line format: findleaks

If your program is built/linked with either allocation or memory level memory checking, then this command finds chunks of memory that were allocated but are not reachable by pointer in the application.

You must halt the process you are debugging to use this command, but invoke the command before the process terminates. Often, this is most easily accomplished by setting a breakpoint on the last line of your program.

This command creates a window showing the following information for each chunk of memory found:

If you click a line in this window, the debugger source pane display moves to the procedure which called malloc, while double clicking a line shows the procedure which called that one, and so on up to five clicks.

Related topic:


Previous

Next



Copyright © 1999, Green Hills Software. All rights reserved.