You can tell MemoryScape to tag information within MemoryScape’s tables and to notify you when your program either frees a block or passes it to
realloc() by using the following two commands:
Tagging is done within MemoryScape’s agent. It tells MemoryScape to watch those memory blocks. Arguments to these commands tell MemoryScape which blocks to tag. If you do not type address arguments, TotalView notifies you when your program frees or reallocates an allocated block. The following example shows how to tag a block and how to see that a block is tagged:
Using the –notify_dealloc subcommand tells MemoryScape to let you know when a memory block is freed or when
realloc() is called with its length set to zero. If you want notification when other values are passed to the
realloc() function, use the
–notify_realloc subcommand.