Runtime checking consists of two parts: memory access checking, and memory use and leak checking. Access checking checks for improper use of memory by the debugged application. Memory use and leak checking involves keeping track of all the outstanding heap space and then on demand or at termination of the program, scanning the available data spaces and identifying the space that has no references.
Runtime checking is available only on Solaris platforms.
(dbx) check -access
(dbx) check -memuse
After turning on the types of runtime checking you want, run your program. The program runs normally, but slowly because each memory access is checked for validity just before it occurs. If dbx detects invalid access, it displays the type and location of the error. You can then use dbx commands such as the where command to get the current stack trace or the print command to examine variables.
You cannot use runtime checking on an application that is a mixture of Java code and C JNI code or C++ JNI code.
For detailed information on using runtime checking, see Chapter 9, Using Runtime Checking.