Can TotalView tell me when a memory block is deallocated?

 

It can. (If it couldn't, this would be a very short tip.)

The first thing you need to do is to locate the memory block. Here are two ways:

  • From within many of the Memory Debugger's views, right-click on a block or block information, and select Properties from the context menu. This command directly brings up a Block Properties window.
  • From within a Variable Window, select the Tools > Block Properties command. Then, go to the Process Window and select the Tools > Memory Block Properties command.

The displayed window looks something like this (it may look different if you you've selected other blocks and depending upon the way you brought up the window):

You'll need to expand the top area. The easiest way to do that is by pressing the Hide Backtrace Information button.

You may have to press a "+" button to see information.

At the bottom are two checkboxes. If you select Notify when deallocated, the Memory Debugger will stop this process's execution and display a Memory Event Notification window when your program deallocates this memory block.


You can find tips that we've already sent out in our Tip Archive

Help us improve these tips!