Using the Memory Analysis tool

The QNX Memory Analysis perspective can help you pinpoint and solve various kinds of problems, including Memory leaks and Memory errors.

The main system allocator has been instrumented to gather statistics related to allocating and freeing memory. This lets the memory statistics module unobtrusively inspect any process's memory usage.

When you launch your program with the Memory Analysis tool, your program uses the library. Besides the normal statistics, this library also tracks the history of every allocation and deallocation, and provides cover functions for the string and memory functions (e.g. strcmp(), memcpy()). Each cover function validates the corresponding function's arguments before using them. For example, if you allocate 16 bytes, then forget the terminating NULL character and attempt to copy a 16-byte string into the block using the strcpy() function, the library detects the error.

The librcheck library uses more memory than the nondebug version. When tracing all calls to malloc(), the library requires additional CPU overhead to process and store the memory-trace events.


The QNX Memory Analysis perspective may produce incorrect results when more than one IDE instance is communicating with the same target system. To use this perspective, ensure that only one IDE instance is connected to the target.

Also, you need to use different storage files if you intend to run simultaneous Memory Analysis sessions. For example, if you want to have two sessions running at the same time, you have to specify different files to log their separate traces.