Resources | Resources |



Identifying and resolving memory leaks in the application

  1. Run your application through the scenario that produces memory leaks.
  2. Close your application.

    Brew MP will report all unreleased memory that was allocated by or on behalf of your application.

  3. For each message where a file from your application was printed in the log messages, use the reported filename and line number to identify the location in the application where the memory allocation was made.

    Inspect and debug the code to determine the reason the allocation was not released, and resolve that defect. For example, if the following messages are reported:

     5/16/2011 1:42:03 PM AEEModule.c:266 - Warning
    -- memory leak, freeing, 0x6E2E760, .\AppUtils.c:325,
    fs:/usermods/ImageApp, size 20
     5/16/2011 1:42:03 PM AEEModule.c:266 - Warning
    -- memory leak, freeing, 0x6EC0D00, NONAME, fs:/usermods/ImageApp,
    size 64
    The first message indicates a memory leak from the application, as it refers to a filename from the application under test. The message indicates that the allocation made on line 325 of AppUtils.c was not freed by the application. The second message does not contain useful information and is most likely indicative of a leaked interface.