Re: Detecting memory leaks
Re: Detecting memory leaks
- Subject: Re: Detecting memory leaks
- From: Daniel Jalkut <email@hidden>
- Date: Thu, 08 Sep 2005 22:04:52 -0400
That's one reasonable way of looking for leaks. You can also look
into the "leaks" command line tool.
You don't need or want to run "Enable Guard Malloc" while you're
checking for leaks. It will just make your app run incredibly slow.
It might help you find some memory stomper bugs at the same time, but
in general it will be a hindrance.
If you find that MallocDebug is reporting a system call leaking,
there's probably nothing you can do about. I have noticed that as of
10.4.2 and Xcode 2.1, however, there are very few "system leaks"
being reported. I don't know if that's because Apple fixed them or if
devtools just taught MallocDebug not to report them :) In other
words, if you're running 10.4.2 and you see a lot of memory leaking
from what appears to be a system API, look extra carefully to make
sure your eyes are not deceiving you. Sometimes "the system leaks"
only because you asked it to!
Daniel
On Sep 8, 2005, at 3:36 PM, email@hidden wrote:
Hi all -
I have written an app that will start up and perform a task x
number of times. If I watch the memory and virtual memory in
Activity Monitor, they are both increasing. To try to find out
what is going on I have turned on "Enable Guard Malloc" in XCode.
I then run my application from Debug -> Launch using Performance
Tool -> MallocDebug.
Next I start my application and let it run. In MallocDebug I
switch to Leaks and it performs the analysis. First question, is
this what I want to do to detect memory leaks? Second question, if
it is and the call that MallocDebug is finding is a system call, is
there something I can do about it?
Thanks,
Kris
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
sweater.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden