• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: release check
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >release check (From: "Ahmet Taha Sakar" <email@hidden>)
 >Re: release check (From: "I. Savant" <email@hidden>)
 >Re: release check (From: Chris Hanson <email@hidden>)

  • Prev by Date: Re: Getting colour data at specified point in an NSImage
  • Next by Date: Re: NSArrayController, saving and reloading sort descriptors
  • Previous by thread: Re: release check
  • Next by thread: FSPathFileOperationStatusProcPtr callback error: -8081
  • Index(es):
    • Date
    • Thread