how to test memory leaks on the Nokia 6600 device using UHEAP_MARK
Login to reply to this topic.
Mon, 2006-11-06 12:39
Joined: 2006-10-25
Forum posts: 27
i hope tat i could get detailed in formation on checking the leaks on the mobile device NOKIA 6630 .

Mon, 2006-11-06 12:46
Joined: 2004-05-26
Forum posts: 732
Tue, 2006-11-07 09:06
Joined: 2006-10-25
Forum posts: 27
Hi,
   I read the tutorial-http://www.newlc.com/Tracking-down-memory-leaks.html
    In this the statement
"   The  symptom
The application works fine (well, this point is not mandatory, it may be completely bugged as well  ) on the phone and emulator. But, when running it on the emulator - and only on it - an error message pops-up when you close the application:" suggests that memory leaks can be tested on the phone and emulator. But to work on the phone i am not having clear idea. I am presently working on Symbian 7.0 ,Nokia 6600 on Carbide C++ platform. Hope anyone could help me out of tis confusion.

Thank You in advance........

Tue, 2006-11-07 09:15
Joined: 2004-05-26
Forum posts: 732
Some panics will only visible in the Emulator like the ALLOC and CONE. (Even if you enable the extended panic note in the device). So if you want to find this kind of panic, enable the extended error code in you emulator, run your application, do what ever process is there in the application and select the Exit/Back in your application to stop application. If there are any ALLOC or CONE in your application you'll get the error note.

Do you've any of the above kind of panic in your application?

Tue, 2006-11-07 09:33
Joined: 2006-10-25
Forum posts: 27
no Vin2talks, i have no such ALLOC and CONE panics in my source code. i have used

__UHEAP_MARK;
   // Read the data from the stream
    TRAPD(error,ExampleL(stream));     
   
    if(error==KErrNone)
    {
       iDocumentSuccesfull = ETrue;      
    }else
    {
      InitializeL();      
      iDocumentSuccesfull= EFalse;
   }
_LIT(KPanicMsg,"AERROR");
__ASSERT_ALWAYS(!error,User::Panic(KPanicMsg, error));
    CleanupStack::PopAndDestroy(); // the stream
__UHEAP_MARKEND;   
Wed, 2006-11-15 11:20
Joined: 2006-10-25
Forum posts: 27
i am usiong Seroes 60 SDK v2 Fp3.
 To know in detail regarding these leaks i was using Hello World examples and made modifications to check fopr leaks.
But while Exit ing the appn i get only Program closed: HelloWorldPlus dialog only but not the ALLOC. Hope u suggest any idea.

As per the link
http://forum.newlc.com/index.php/topic,16070.0.html
i verified my tools->.........., but in this i have no preferences folder etc.......

Suggest me some views.
Wed, 2006-11-15 15:20
Joined: 2004-05-26
Forum posts: 732
That was not the folder name I was talking!!!!

You open the emulator then you can find a Tools menu there now go to the Preferences >> Global Settings and enable the Extended Panic code. The same can be done manually by creating an ErrRd file in the physical folder of your PC (%EPOCROOT%\Epoc32\winscw\c\system\Bootdata\), as Andreas had mentioned in one of your thread.

Wed, 2006-11-15 19:54
Joined: 2006-03-04
Forum posts: 194
You can't find out if you have a memory leak on the device because the mechanisms for detecting it are only enabled in debug builds and not in release builds. In orther words __UHEAL_MARKEND doesn't do anything on the device (unless you have a device with a debug build which you are unlikely to have unless you have the ability to flash the device).

copyright 2003-2009 NewLC SARL