TVHEAP_ARGS
Environment variable for presetting MemoryScape values
When you start TotalView, it looks for the TVHEAP_ARGS environment variable. If it exists, TotalView reads values placed in it. If one of these values changes a MemoryScape default value, MemoryScape uses this value as the default.
If you select a <Default> button in the GUI or a reset option in the CLI, MemoryScape resets the value to the one you set here, rather than to its default.
TVHEAP_ARGS Values
The values that you can enter into this variable are as follows:
display_allocations_on_exit=boolean
Tells MemoryScape to dump the allocation table when your program exits. If your program ends because it received a signal, MemoryScape might not be able to dump this table.
backtrace_depth=depth
Sets the backtrace depth value. See
“Showing Backtrace Information: dheap -backtrace:” for more information.
backtrace_trim=trim
Sets the backtrace trim value. See
“Showing Backtrace Information: dheap -backtrace:” for more information.
enable_event_filtering=boolean
notify_free_not_allocated=boolean
notify_realloc_not_allocated=boolean
notify_addr_not_at_start=boolean
notify_double_alloc=boolean
notify_guard_corruption=boolean
notify_alloc_not_in_heap=boolean
notify_alloc_null=boolean
notify_alloc_returned_bad_alignment=boolean
notify_bad_alignment_argument=boolean
notify_dealloc=boolean
notify_realloc=boolean
notify_double_dealloc=boolean
Same meanings as dheap -event_filter.
enable_guard_blocks=boolean
guard_max_size=positive-integer
guard_pre_size=positive-integer
guard_post_size=positive-integer
guard_pre_pattern=integer
guard_post_pattern=integer
Same meanings as dheap -guard.
enable_hoarding=boolean
hoard_all_blocks=boolean
hoard_maximum_num_blocks=positive-integer
hoard_maximum_kb=positive-integer
Same meanings as dheap -hoard.
enable_hoard_autoshrink=boolean
hoard_autoshrink_threshold_kb=positive-integer
hoard_autoshrink_trigger_count=positive-integer
enable_red_zones=boolean
enable_rz_size_ranges=boolean
rz_alignment=positive-integer
rz_detect_underrun=boolean
rz_detect_overrun=boolean
rz_detect_use_after_free=boolean
rz_end_alligned=boolean
rz_exit_val=integer
rz_fence_size=positive-integer
rz_mode=overrun | underrun |unfenced | manual
rz_size_range=positive-integer,positive-integer,positive-integer
rz_size_range_enable=positive-integer,boolean
Same meanings as with dheap -red_zones.
memalign_strict_alignment_even_multiple
MemoryScape provides an integral multiple of the alignment rather than the even multiple described in the Sun memalign documentation. By including this value, you are telling MemoryScape to use the Sun alignment definition. However, your results might be inconsistent if you do this.
output_fd=int
output_file=pathname
Sends output from MemoryScape to the file descriptor or file that you name.
paint_on_alloc=boolean
paint_on_dealloc=boolean
paint_on_zalloc=boolean
paint_alloc_pattern=integer
paint_dealloc_pattern=integer
Same meanings as with dheap -paint
verbosity=int
Sets MemoryScape’s verbosity level. If the level is greater than 0, MemoryScape sends information to stderr. The values you can set are:
0: Display no information. This is the default.
1: Print error messages.
2: Print all relevant information.
This option is most often used when debugging MemoryScape problems. Setting the TotalView VERBOSE CLI variable does about the same thing.
Example:
For more than one value, separate entries with spaces and place the entire entry within quote. For example:
setenv TVHEAP_ARGS=”output_file=my_file backtrace_depth=16”