Read-only archive of the All About Symbian forum (2001–2013) · About this archive

Memory leaks???

7 replies · 0 views · Started 15 October 2005

Hi!

I have tested my application with LowMem tool and below is the Summary
Results:

Test Counts: 55
Test Failed(%) : 0
Mem Leak: 35
I have thoroughly checked my application for all possible memory leaks but
all in vain.

Is there any tools available to check the source of the memory leaks?

How can I make memory leaks count=0??

Any help in this regard will be highly valuable.

Thanks & Regards,
Lalit

> Is there any tools available to check the source of the memory leaks?

Check out symbian site for developer tools such as AnalyseHeap,
HookLogger, etc.

--
David Caabeiro
www.PushL.com

Hi,

As the LowMem User Guide indicates, memory leak count>0 is not necessarily
deemed as a failure - although
one should bring down the count to 0, if possible, as a matter of best
practice.

If you cannot find any obvious leak in your code, it could be one of the
system APIs that is causing the leak. We advice you to use process of
elimination to find the possbile source of the leak. Note that some leaks
only surface in extreme memory outage conditions; hence, some API migth not
exihibit leaks on an Emulator, for example, on normal memory conditions.

Symbian Signed Team.

"Lalit" <[email protected]> wrote in message
news:25x7Hj1lFHA.2924@extapps30...
> Hi!
>
> I have tested my application with LowMem tool and below is the Summary
> Results:
>
> Test Counts: 55
> Test Failed(%) : 0
> Mem Leak: 35
> I have thoroughly checked my application for all possible memory leaks but
> all in vain.
>
> Is there any tools available to check the source of the memory leaks?
>
> How can I make memory leaks count=0??
>
> Any help in this regard will be highly valuable.
>
> Thanks & Regards,
> Lalit
>
>
>

Hi,

It would be nice if Symbian along with other SDK vendors would publish a
centralised list of System APIs that are known to leak memory under varied
conditions. Scattered information is available now this information cannot
be taken as a certainty; an official list would save a lot of time for
developers.

Thanks, AK

"Symbian Signed" <[email protected]> wrote in message
news:LddYIX3lFHA.1300@extapps30...
> Hi,
>
> As the LowMem User Guide indicates, memory leak count>0 is not necessarily
> deemed as a failure - although
> one should bring down the count to 0, if possible, as a matter of best
> practice.
>
> If you cannot find any obvious leak in your code, it could be one of the
> system APIs that is causing the leak. We advice you to use process of
> elimination to find the possbile source of the leak. Note that some leaks
> only surface in extreme memory outage conditions; hence, some API migth

not
> exihibit leaks on an Emulator, for example, on normal memory conditions.
>
> Symbian Signed Team.
>
>
> "Lalit" <[email protected]> wrote in message
> news:25x7Hj1lFHA.2924@extapps30...[color=green]
> > Hi!
> >
> > I have tested my application with LowMem tool and below is the Summary
> > Results:
> >
> > Test Counts: 55
> > Test Failed(%) : 0
> > Mem Leak: 35
> > I have thoroughly checked my application for all possible memory leaks
[/color]
but[color=green]
> > all in vain.
> >
> > Is there any tools available to check the source of the memory leaks?
> >
> > How can I make memory leaks count=0??
> >
> > Any help in this regard will be highly valuable.
> >
> > Thanks & Regards,
> > Lalit
> >
> >
> >

>
>[/color]

Thanks for your replies.

I think AK's suggestion will be of great help to all developers.

Following is the memory leak log produced by LowMem tool:

Requested free bytes,Actual free bytes,Memory leak count
39936,39932,2

52224,52220,35

53248,53244,3

Can anyone suggest me how to interpret the above log details?

Regards,
Lalit

"ak" <[email protected]> wrote in message
news:M15XAZ3lFHA.1016@extapps30...
> Hi,
>
> It would be nice if Symbian along with other SDK vendors would publish a
> centralised list of System APIs that are known to leak memory under varied
> conditions. Scattered information is available now this information cannot
> be taken as a certainty; an official list would save a lot of time for
> developers.
>
> Thanks, AK
>
> "Symbian Signed" <[email protected]> wrote in message
> news:LddYIX3lFHA.1300@extapps30...[color=green]
> > Hi,
> >
> > As the LowMem User Guide indicates, memory leak count>0 is not
[/color]
necessarily[color=green]
> > deemed as a failure - although
> > one should bring down the count to 0, if possible, as a matter of best
> > practice.
> >
> > If you cannot find any obvious leak in your code, it could be one of the
> > system APIs that is causing the leak. We advice you to use process of
> > elimination to find the possbile source of the leak. Note that some
[/color]
leaks[color=green]
> > only surface in extreme memory outage conditions; hence, some API migth

> not
> > exihibit leaks on an Emulator, for example, on normal memory conditions.
> >
> > Symbian Signed Team.
> >
> >
> > "Lalit" <[email protected]> wrote in message
> > news:25x7Hj1lFHA.2924@extapps30...[color=darkred]
> > > Hi!
> > >
> > > I have tested my application with LowMem tool and below is the Summary
> > > Results:
> > >
> > > Test Counts: 55
> > > Test Failed(%) : 0
> > > Mem Leak: 35
> > > I have thoroughly checked my application for all possible memory leaks
[/color]
> but[color=darkred]
> > > all in vain.
> > >
> > > Is there any tools available to check the source of the memory leaks?
> > >
> > > How can I make memory leaks count=0??
> > >
> > > Any help in this regard will be highly valuable.
> > >
> > > Thanks & Regards,
> > > Lalit
> > >
> > >
> > >

> >
> >[/color]
>
>[/color]

Thanks alot everyone for all your help. I finally got rid of those memory
leaks.

Regards,
Lalit

"Lalit" <[email protected]> wrote in message
news:OW9LGU%23lFHA.504@extapps30...
> Thanks for your replies.
>
> I think AK's suggestion will be of great help to all developers.
>
> Following is the memory leak log produced by LowMem tool:
>
> Requested free bytes,Actual free bytes,Memory leak count
> 39936,39932,2
>
> 52224,52220,35
>
> 53248,53244,3
>
> Can anyone suggest me how to interpret the above log details?
>
> Regards,
> Lalit
>
>
>
>
> "ak" <[email protected]> wrote in message
> news:M15XAZ3lFHA.1016@extapps30...[color=green]
> > Hi,
> >
> > It would be nice if Symbian along with other SDK vendors would publish a
> > centralised list of System APIs that are known to leak memory under
[/color]
varied[color=green]
> > conditions. Scattered information is available now this information
[/color]
cannot[color=green]
> > be taken as a certainty; an official list would save a lot of time for
> > developers.
> >
> > Thanks, AK
> >
> > "Symbian Signed" <[email protected]> wrote in message
> > news:LddYIX3lFHA.1300@extapps30...[color=darkred]
> > > Hi,
> > >
> > > As the LowMem User Guide indicates, memory leak count>0 is not
[/color]
> necessarily[color=darkred]
> > > deemed as a failure - although
> > > one should bring down the count to 0, if possible, as a matter of best
> > > practice.
> > >
> > > If you cannot find any obvious leak in your code, it could be one of
[/color][/color]
the[color=green][color=darkred]
> > > system APIs that is causing the leak. We advice you to use process of
> > > elimination to find the possbile source of the leak. Note that some
[/color]
> leaks[color=darkred]
> > > only surface in extreme memory outage conditions; hence, some API
[/color][/color]
migth[color=green]
> > not[color=darkred]
> > > exihibit leaks on an Emulator, for example, on normal memory
[/color][/color]
conditions.[color=green][color=darkred]
> > >
> > > Symbian Signed Team.
> > >
> > >
> > > "Lalit" <[email protected]> wrote in message
> > > news:25x7Hj1lFHA.2924@extapps30...
> > > > Hi!
> > > >
> > > > I have tested my application with LowMem tool and below is the
[/color][/color]
Summary[color=green][color=darkred]
> > > > Results:
> > > >
> > > > Test Counts: 55
> > > > Test Failed(%) : 0
> > > > Mem Leak: 35
> > > > I have thoroughly checked my application for all possible memory
[/color][/color]
leaks[color=green]
> > but[color=darkred]
> > > > all in vain.
> > > >
> > > > Is there any tools available to check the source of the memory
[/color][/color]
leaks?[color=green][color=darkred]
> > > >
> > > > How can I make memory leaks count=0??
> > > >
> > > > Any help in this regard will be highly valuable.
> > > >
> > > > Thanks & Regards,
> > > > Lalit
> > > >
> > > >
> > > >
> > >
> > >

> >
> >[/color]
>
>[/color]

Indeed, although I hasten to add that such leaking APIs are few and far
between - thus, absence of an official list...although there migth be other
APIs that have not come to surface! From memory only one API has been
highligthed todate - CFbsScreenDevice::NewL(). If such offending APIs
increase in number, we will endeavour to publish them.

Symbian Signed.

"ak" <[email protected]> wrote in message
news:M15XAZ3lFHA.1016@extapps30...
> Hi,
>
> It would be nice if Symbian along with other SDK vendors would publish a
> centralised list of System APIs that are known to leak memory under varied
> conditions. Scattered information is available now this information cannot
> be taken as a certainty; an official list would save a lot of time for
> developers.
>
> Thanks, AK
>
> "Symbian Signed" <[email protected]> wrote in message
> news:LddYIX3lFHA.1300@extapps30...[color=green]
> > Hi,
> >
> > As the LowMem User Guide indicates, memory leak count>0 is not
[/color]
necessarily[color=green]
> > deemed as a failure - although
> > one should bring down the count to 0, if possible, as a matter of best
> > practice.
> >
> > If you cannot find any obvious leak in your code, it could be one of the
> > system APIs that is causing the leak. We advice you to use process of
> > elimination to find the possbile source of the leak. Note that some
[/color]
leaks[color=green]
> > only surface in extreme memory outage conditions; hence, some API migth

> not
> > exihibit leaks on an Emulator, for example, on normal memory conditions.
> >
> > Symbian Signed Team.
> >
> >
> > "Lalit" <[email protected]> wrote in message
> > news:25x7Hj1lFHA.2924@extapps30...[color=darkred]
> > > Hi!
> > >
> > > I have tested my application with LowMem tool and below is the Summary
> > > Results:
> > >
> > > Test Counts: 55
> > > Test Failed(%) : 0
> > > Mem Leak: 35
> > > I have thoroughly checked my application for all possible memory leaks
[/color]
> but[color=darkred]
> > > all in vain.
> > >
> > > Is there any tools available to check the source of the memory leaks?
> > >
> > > How can I make memory leaks count=0??
> > >
> > > Any help in this regard will be highly valuable.
> > >
> > > Thanks & Regards,
> > > Lalit
> > >
> > >
> > >

> >
> >[/color]
>
>[/color]

Lalit wrote:
> Hi!
>
> I have tested my application with LowMem tool and below is the Summary
> Results:
>
> Test Counts: 55
> Test Failed(%) : 0
> Mem Leak: 35
> I have thoroughly checked my application for all possible memory leaks but
> all in vain.
>
> Is there any tools available to check the source of the memory leaks?
>
> How can I make memory leaks count=0??
>
> Any help in this regard will be highly valuable.
>
> Thanks & Regards,
> Lalit
>
>
>

It is my knowledge that the C standard dictates that ANY memory not
deallocated after exiting your application is de-allocated by the system.

Therefore 'memory leaks' on exit of an Application are nothing to worry
about.

However, having memory leaks while the application is running is very
bad since the system memory will eventualle be drained, and such an
error is typically an indication something much worse could be happening
in your application.

R