Heap Analysis: Making Memory Errors a Thing of the Past
If you develop a program that dynamically allocates memory, you're also responsible for tracking any memory that you allocate whenever a task is performed, and for releasing that memory when it's no longer required. If you fail to track the memory correctly, you may introduce "memory leaks" or unintentionally write to an area outside of the memory space.
Conventional debugging techniques usually prove to be ineffective for locating the source of corruption or leak because memory-related errors typically manifest themselves in an unrelated part of the program. Tracking down an error in a multithreaded environment becomes even more complicated because the threads all share the same memory address space.
We'll describe how BlackBerry 10 OS manages the heap and introduce you to a special version of our memory management functions that will help you to diagnose your memory management problems.
Last modified: 2014-06-24