Oracle® Solaris 11.2 Programming Interfaces Guide

Exit Print View

Updated: July 2014
 
 

Dynamic Memory Debugging

The Oracle Solaris Studio software included tools that are useful in finding and eliminating errors in dynamic memory use.

dbx is an interactive, source-level, command-line debugging tool. You can use it to run a program in a controlled manner and to inspect the state of a stopped program. dbx gives you complete control of the dynamic execution of a program, including collecting performance and memory usage data, monitoring memory access, and detecting memory leaks. dbxtool provides a graphical user interface for dbx. See Oracle Solaris Studio 12.3: Debugging a Program With dbx for detailed information.

The Run Time Checking (RTC) tool in the Oracle Solaris Studio software lets you automatically detect runtime errors, such as memory access errors and memory leak, in a native code application during the development phase. It also lets you monitor memory usage. You cannot use runtime checking on Java code. See Chapter 9, Using Runtime Checking, in Oracle Solaris Studio 12.3: Debugging a Program With dbx for details on using the RTC facility.

libumem is a memory management library. You can use libumem to detect memory management bugs. libumem is a user space slab allocation library, which performs object caching that results in caching the frequently allocated and freed memory. This reduces the overhead of creating and releasing the memory. You can view the information about memory cache, memory allocation, and memory corruption using Modular Debugger (MDB). For information about modular debugger, see Oracle Solaris Modular Debugger Guide .

You can also use the advanced development tool Memory Error Discovery Tool (Discover) for detecting memory access error. See the Oracle Solaris Studio 12.3 Discover and Uncover User's Guide for detailed information.

Oracle Solaris Studio is available on as a package to download and install on the Oracle Solaris 11 OS. For more information, see the Oracle Solaris Studio website.