Re: release check
Re: release check
- Subject: Re: release check
- From: "Sean McBride" <email@hidden>
- Date: Thu, 15 Mar 2007 10:59:04 -0400
- Organization: Rogue Research
On 2007-03-14 15:15, Chris Hanson said:
>Detecting leaks at exit is fairly easy on Mac OS X.
>
>1. Set up an executable for your application that has the following
>malloc(3) environment variables set:
>
> MallocStackLogging=1
> MallocScribble=1
> MallocPreScribble=1
>
>You can see what these environment variables do in the malloc(3) man
>page.
Theoretically fine, except that in practice MallocStackLogging is
horribly broken and should never be used. It's logging code is not
thread-safe, and so if two threads are in malloc/free at the same time
(thus both logging), you will crash. And as discussed recently (I think
on this list) the OS creates threads 'behind your back' all the time (UI
heart beat, etc.).
So basically, you can't trust MallocStackLogging. :(
See:
<http://lists.apple.com/archives/mt-smp/2007/Jan/msg00010.html>
<rdar://4962019>
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden