Memory errors

Memory errors occur if your program writes to any memory that it doesn't own, tries to free the same heap memory twice, or uses a stale or invalid pointer. The Memory Analysis tool can help you pinpoint the source code that causes these memory errors, which is often in a section of the code that's unrelated to the operation that triggered the seemingly random crash.

To learn more about common causes of memory errors, see the Heap Analysis chapter of the QNX Neutrino Programmer's Guide.

The Memory Analysis tooling consists of IDE visualization tools and a runtime library called librcheck.so. The library overrides the allocator and implements an algorithm that can detect memory leaks at runtime. You don't need to recompile your program to enable error detection; the library can be pre-loaded at runtime if you're running your program with Memory Analysis enabled.