Discussion Board

Results 1 to 11 of 11
  1. #1
    Super Contributor chandran.biju007's Avatar
    Join Date
    Nov 2008
    Posts
    675
    Hi,
    I want to know if there is a On Device memory leak detection tool available for use like On Device Debugger.
    I read the documentation for HookLogger and my understanding is it will work only on emulator..

    Regards
    Biju

  2. #2
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Mallorca, Holiday
    Posts
    27,683
    As far as I know, that is not possible. Heap check is done by the debug variant of euser.dll, and the actual devices contain release code.

  3. #3
    Nokia Developer Champion hotcheese's Avatar
    Join Date
    Jul 2004
    Posts
    2,015
    Unless you have the ability to reflash the device with a debug build of the relevant components its not possible.

  4. #4
    Super Contributor chandran.biju007's Avatar
    Join Date
    Nov 2008
    Posts
    675
    Ok...My application has a lot of functionality built on the Cell Network Information,GPS and internet connectivity using GPRS.
    So is there any way i can debug a memory leak rather than shooting in the dark by trial and error method....

  5. #5
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Mallorca, Holiday
    Posts
    27,683
    You can try the Code Scanner.

  6. #6
    Nokia Developer Champion hotcheese's Avatar
    Join Date
    Jul 2004
    Posts
    2,015
    Actually my previous response was talking about on-device memory leak detection, memory leak detection is only enabled in debug build. Memory leak debugging is a different, but related, thing to memory leak detection. I don't personally know what the latest tools are for assisting that.

    I'm assuming the following definitions: memory-leak detection is finding out you have a memory leak somewhere.
    Memory leak debugging is finding out the precise cause of the memory leak.

    Your first posting was asking about detection, your second about debugging. Do you want to find out if you have any leaks or want to find out where the leaks are comming from? If the latter, how do you know you have a memory leak?
    Last edited by hotcheese; 2009-07-15 at 20:22.

  7. #7
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Mallorca, Holiday
    Posts
    27,683
    Recently I have used something like this for detecting obvious losses of memory:
    Code:
    TInt WatchMem(TAny *)
    {
        TBuf<20> buf;
        TInt size;
        TInt count=User::AllocSize(size);
        _LIT(KFormat,"%d/%d");
        buf.Format(KFormat,size,count);
        User::InfoPrint(buf);
        return 1;
    }
    and put
    Code:
    CPeriodic::NewL(EPriorityStandard)->Start(1000000,1000000,TCallBack(WatchMem));
    somewhere, which is a memory leak in itself, just I do not care (you can put the CPeriodic into a member variable, and suddenly it will become nice).
    Having the ErrRd file installed, most S60 3rd edition devices will show the output of User::InfoPrint.

  8. #8
    Super Contributor chandran.biju007's Avatar
    Join Date
    Nov 2008
    Posts
    675
    Hi Wizard,
    Is appUI the right place to put this code??

  9. #9
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Mallorca, Holiday
    Posts
    27,683
    Yes, I have put it into AppUi::ConstructL too.

  10. #10
    Super Contributor chandran.biju007's Avatar
    Join Date
    Nov 2008
    Posts
    675
    Kindly elaborate how it wrks??does it provide the memory being used by the app every 10 seconds???

  11. #11
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Mallorca, Holiday
    Posts
    27,683
    Yes, that is all. It is not bulletproof, but it can be still useful. Just test the functions of your application, and check how memory usage changes.

Similar Threads

  1. Раскладка клавиатуры в консоли
    By arkenoi in forum Russian Developer Forum - Форум Российских разработчиков
    Replies: 11
    Last Post: 2009-03-18, 18:27
  2. strange memory leak
    By krix in forum Symbian C++
    Replies: 2
    Last Post: 2007-02-15, 08:52
  3. Memory leak detecting tool
    By eyalmnm in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2007-01-16, 13:45
  4. LowMem test, memory leak, app, Launch-up sequence
    By oshami in forum Symbian C++
    Replies: 5
    Last Post: 2005-02-17, 08:03
  5. can not successfully link any sample using .NET
    By lobotomat in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2002-08-20, 00:29

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved