All forms of the check and uncheck commands are described below.
The check command prints the current status of RTC
check
check -access
check -leaks [-frames n ] [-match m]
-frames n |
Up to n distinct stack frames are displayed when showing the allocation trace of the leaked block. |
-match m |
Used for combining leaks; if the call stack at the time of allocation for two or more leaks matches m frames, then these leaks are reported in a single combined leak report. |
The default value of n is 8 or the value of m (whichever is larger), with a maximum value of 16. The default value of m is 2.
The command check -memuse implies check -leaks. In addition to a leak report at the program exit, you also get a memory use report. At any time during program execution, you can see where all the memory in the program has been allocated.
check -memuse [-frames n ] [-match m]
-frames n |
Up to n distinct stack frames are listed when showing the allocation trace of the block in use. |
-match m |
There may be many blocks in use in the program, so RTC automatically combines the blocks allocated from the same execution trace into one report. The decision to combine the report is controlled by value of m. If the call stack at the allocation of two or more blocks matches m frames, then these blocks are reported in a combined block in use report. The way that blocks are combined is similar to the method used in a leak report. |
The default value of n is 8 or the value of m (whichever is larger), with a maximum value of 16. The default value of m is 2.
These two commands are equivalent:
check -all [-frames n ] [-match m] check -access ; check -memuse [-frames n ] [-match m]
uncheck -access
uncheck -leaks
To turn off memory use checking (leak checking is also turned off):
uncheck -memuse
The following two commands are equivalent:
uncheck -all uncheck -access; uncheck -memuse
These two commands are equivalent:
uncheck [funcs] [files] [loadobjects ] suppress all in funcs files loadobjects
This command allows you to turn on checking in specific functions, modules, and load objects while leaving it turned off for the rest of the program:
check function* file* loadobject*
This command is equivalent to:
suppress all unsuppress all in function * file* loadobject *
The command operates cumulatively. For example, the first three commands are equivalent to the last four commands:
check main check foo check f.c suppress all unsuppress all in main unsuppress all in foo unsuppress all in f.c
Notice that the suppress all command is only applied once, leaving checking turned on for main, foo, and f.c.
These commands are also equivalent:
uncheck function* file* loadobject suppress all in function* file* loadobject*