wiki1247: MemoryAnalysis (Version 4) |
Overview#The QNX Momentics memory analysis tool combines powerful visualization features with an innovative method of databasing memory usage, allowing developers to quickly pinpoint memory errors and leaks, and optimize memory usage.The memory analysis tool helps developers visualize the memory usage of programs, and can quickly detect buffer overruns, invalid deallocations, and other common memory errors. It provides:
Catch memory errors using the allocation library#QNX Momentics provides an allocation library with cover routines for most string and memory operations. These routines check the integrity of memory before using it, allowing developers to catch errors such as overruns, underruns, invalid use of memory, and freeing the same memory twice. Once an error is found, a convenient back trace places shows the code editor at the offending line of code. These bugs can be fixed and retested quickly before submission to a project's build. Choose the best method for dealing with errors#The memory analysis tool intelligently tracks each memory error as a task, and automatically annotates the program source with a warning. When a memory error is detected, developers can:
In each case the memory analysis tool indicates the source of the problem along with a call stack trace indicating the path that caused the error. Fixes are quickly made and tested. Profile memory usage for in-depth understanding#Understanding the memory profile of a system is key to optimizing memory resources. The memory analysis tool tracks all memory allocations and deallocations and displays these in a time-ordered fashion to assist in understanding when, where, and how memory is being used. Optimize memory resources#Using memory profiling technology, the memory analysis tool can help indentify opportunities to optimize memory usage. For example, memory profiling may reveal heavy memory usage of a certain size at fixed intervals. The memory profile indicates when the memory is allocated, where it's allocated in the code, how often and at what time intervals. Unwanted allocations can then be easily traced to the code where developers can implement a more efficient scheme. Resources# |