Re: 'leaks' tool is inconsistent under otest
Re: 'leaks' tool is inconsistent under otest
- Subject: Re: 'leaks' tool is inconsistent under otest
- From: Bill Bumgarner <email@hidden>
- Date: Wed, 09 Jul 2008 09:39:42 -0700
On Jul 8, 2008, at 5:14 PM, Romain Marucchi wrote:
For detecting memory leaks I give up on apple's tools (instruments,
MallocDebug and leaks )...
I found this neat source (find it in attachment) somewhere on the
net that tweak a little and this do a better job than any of the
app. mentioned above, if you are using pure C (like me) i would
suggest you to give it a shot...
Cheers!
ps: This is cross platform too so... good stuff
First, the memory debugging tools provided with Xcode work relatively
well. There are a handful of situations where they do not work or are
inaccurate, but they are actually quite good at detecting leaks once
you figure out how to use them. If there are particular situations
where they don't work or you can't figure out how to make them work,
please file enhancement requests and bug reports.
Certainly, they work a heck of a lot better than the archive of code
attached to the original message. Specifically, the system provided
tools can easily track the history of allocation events for any given
address within your application, including backtraces of exactly when
each event occurred. And the system provided tools can provide heap
analysis, usage analysis, object graph analysis (who refers to who),
and VM analysis -- all of which are critical to debugging memory use
within an application and none of which can be done with the attached
source.
As well, the built in tools actually work across all frameworks and
libraries provided by Apple, including C, Objective-C and C++. The
attached source would only work in code recompiled to use the cover
functions for malloc() / free() provided therein -- as soon a pointer
escapes into a system library, it loses.
Furthermore, the attached code has zero awareness of threading or,
even, synchronization primitives that would allow the code to work in
threaded environment.
b.bum
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden