• 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
Leaks not showing my leak
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Leaks not showing my leak


  • Subject: Leaks not showing my leak
  • From: Tom Bernard <email@hidden>
  • Date: Mon, 11 Jul 2005 10:27:40 -0600

I wrote a small app to see the command line tool leaks in action. The app,
Leak Study
<http://bersearch.com/MacOSXSoftware/TomsCocoaSoftware/Leak.Study.050709.001
3.zip>, waits 15 seconds, then sets up a repetitive timer to leak 1M every
10 seconds. When I run leaks after each allocation, leaks shows 2 leaks that
appear to belong to Cocoa (see the stack trace), but does not show the 1M
leak allocated by my app. Leaks does show the allocation for the app
increased by a megabyte for each timer event.

The attached sample is after several allocations and should show each of
those allocations as a 1 megabyte leak. The sample only shows the 2 leaks
that occurred at launch.

While checking the archives, I saw a reference to a bug with dead-code
stripping that affected the leaks tool, and another reference to zero-link.
For what its worth, I rebuilt the app with dead-code stripping and zero-link
disabled which gave the same results.

Why is leaks not detecting my 1 megabyte allocation as a leak? What am I
missing?

Thanks in advance.

Best regards,

Tom Bernard
email@hidden


Sample output:

  Process 703: 10676 nodes malloced for 5080 KB
Process 703: 2 leaks for 240 total leaked bytes.
Leak: 0x0036b480  size=160
        0x0000000c 0x00000001 0x00000000 0x00000002     ................
        0x92919478 0x0036b430 0x00000007 0x939748c8     ...x.6.0......H.
        0x003299d0 0x0000000a 0x939748c8 0x003520e0     .2........H..5 .
        0x00000000 0x00000000 0x00000000 0x00000000     ................
        0x00000000 0x00000000 0x00000000 0x00000000     ................
        0x00000000 0x00000000 0x00000000 0x00000000     ................
        0x00000000 0x00000000 0x00000000 0x00000000     ................
        0x00000000 0x00000000 0x00000000 0x00000000     ................
        ...
        Call stack: [thread 2c1f]: | 0xbffff9bc | start | _start | main |
NSApplicationMain | -[NSApplication run] | -[NSApplication
nextEventMatchingMask:untilDate:inMode:dequeue:] | _DPSNextEvent |
BlockUntilNextEventMatchingListInMode | ReceiveNextEventCommon |
RunCurrentEventLoopInMode | CFRunLoopRunSpecific | __CFRunLoopRun |
__CFRunLoopDoObservers | _handleWindowNeedsDisplay | -[NSWindow
displayIfNeeded] | -[NSView displayIfNeeded] | -[NSViewHierarchyLock
lockForReadingWithExceptionHandler:] | _NSAddExceptionHandlerForLock |
_NSAddAltHandler2 | malloc
Leak: 0x0036b430  size=80
        0x00000008 0x00000000 0x003526d0 0x00000000     .........5&.....
        0x00000000 0x00000000 0x00000000 0x00000000     ................
        0x00000000 0x00000000 0x00000000 0x00000000     ................
        0x00000000 0x00000000 0x00000000 0x00000000     ................
        0x00000000 0x00000000 0x00000000 0x00000000     ................
        Call stack: [thread bffff26f]: | 0xbffff9bc | start | _start | main
| NSApplicationMain | -[NSApplication run] | -[NSApplication
nextEventMatchingMask:untilDate:inMode:dequeue:] | _DPSNextEvent |
BlockUntilNextEventMatchingListInMode | ReceiveNextEventCommon |
RunCurrentEventLoopInMode | CFRunLoopRunSpecific | __CFRunLoopRun |
__CFRunLoopDoObservers | _handleWindowNeedsDisplay | -[NSWindow
displayIfNeeded] | -[NSView displayIfNeeded] | -[NSViewHierarchyLock
lockForReadingWithExceptionHandler:] | _NSAddExceptionHandlerForLock


 _______________________________________________
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

  • Prev by Date: What is 'One Shot' option in Interface Builder's NSWindow Inspector?
  • Next by Date: Re: What is 'One Shot' option in Interface Builder's NSWindow Inspector?
  • Previous by thread: Re: What is 'One Shot' option in Interface Builder's NSWindow Inspector?
  • Next by thread: re: Leaks not showing my leak
  • Index(es):
    • Date
    • Thread