Results 1 to 4 of 4

Thread: memory leak question

  1. #1
    Join Date
    Jul 2008
    Posts
    5
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default memory leak question

    All,

    I am working on mobile devices and encountering some weird problem. The problem follows:

    There is a stress testing going on the phone. The phone is run to make calls for almost 24 hrs. After almost 23/24 hrs the phone crashes/panics. The initial analysis says there is memory leak due to which this panic is seen. The analysis says there is a memory of 0x54 bytes which is allocated by some application which is NOT deallocated. Some other app is trying to access this memory and since the memory is NOT deallocated the phone panics. Now since in the phone there are many application and there are hell lots of memory allocated/deallocated, how is it possible to detect this memory leak. I am looking for some hints which can help me root cause the issue. Can someone pls help me with this weird problem.

    Thanks in advance

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: memory leak question

    You have to at least pinpoint the process responsible for the leak... You can try substituting malloc() and free() calls with crafted functions that will do bookkeeping. Or run those applications on the desktop under Valgrind.

  3. #3
    Join Date
    Jul 2008
    Posts
    5
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: memory leak question

    "You can try substituting malloc() and free() calls with crafted functions that will do bookkeeping"

    Any examples?

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: memory leak question

    I mean something like mpatrol (although there are better solutions than mpatrol itself):

    http://mpatrol.sourceforge.net/

Similar Threads

  1. Memory leak detection
    By Sid in forum Qt Programming
    Replies: 8
    Last Post: 4th May 2011, 22:38
  2. Memory leak weirdness
    By Darhuuk in forum General Programming
    Replies: 10
    Last Post: 10th January 2008, 18:51
  3. QPixMap and Memory leak
    By Krish_ng in forum Qt Programming
    Replies: 1
    Last Post: 7th August 2007, 14:18
  4. Memory Leak in my Application :-(
    By Svaths in forum Qt Programming
    Replies: 4
    Last Post: 27th July 2007, 19:42
  5. Qt 4.1 Memory Leak
    By blackliteon in forum Qt Programming
    Replies: 14
    Last Post: 10th February 2006, 12:47

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.