memscript Example
The example here performs these actions:
*Runs the filterapp program under TotalView control.
*Passes an argument of 2 to the filterapp program.
*Whenever any event occurs—an HIA event, SEGV, and the like—saves a memory debugging file.
*Allows the script to run for no longer than 5 seconds.
*Performs the following activities: use guard blocks, hoard freed memory, and detect memory leaks.
memscript -maxruntime "00:00:05" \
-event_action "any_event=save_memory_debugging_file" \
-guard_blocks -hoard_freed_memory -detect_leaks \
~/Work/filterapp -a 2