Enabling leak detection

To run leak a detection application and all user specific shared libraries, it should be compiled with debug information, and the target should have librcheck.so library installed.

To enable leak detection, from the IDE:

  1. From an existing launch configuration, select the Tools tab.
  2. Select Add/Delete Tool.
  3. Select Memory Analysis and click OK.

  4. On the Memory Analysis tab, expand Memory Errors.
  5. The easiest way to detect leaks is to specify a time interval for leak detection. For example, if you want to enable leak detection every minute, enter 60000 (for 60 seconds) in the Perform leak check every (ms) field.
  6. On the Memory Analysis tab, expand Memory Tracing and ensure that tracing is enabled. If tracing isn't enabled, leaks would be detected, but wouldn't carry out the allocation backtrace, which makes it almost impossible to identify.
  7. Select the Perform leak check when process exits option if your application exists normally.
  8. Select the Switch to this tool's perspective on launch' option.
  9. After enabling Memory Analysis in a launch configuration, run that configuration.
There are a few other ways to enable memory analysis, including attaching to a running application or postmortem analysis. For more information about these and other launch options, see Launching your program with Memory Analysis.