• 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: Best way to find memory leaks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Best way to find memory leaks


  • Subject: Re: Best way to find memory leaks
  • From: Nick Zitzmann <email@hidden>
  • Date: Fri, 25 Jun 2004 08:46:09 -0600

On Jun 25, 2004, at 8:02 AM, Ken Tozier wrote:

For simplicity's sake, all my allocation uses the various + (id) xxx class methods but it seems that an awful lot of stuff isn't getting released. On a machine with 1 GB of ram, the program runs for about 10 minutes and then just stops. No "out of memory errors" but looking at the bar charts in Object Alloc shows a few bars that are off the charts for memory usage. Problem is Obj Alloc is useless for tracking down the problem as the culprit usually has a cryptic name like "libxxx 23".

ObjectAlloc isn't necessarily used for finding memory leaks. ObjectAlloc's strength is finding places where a program is allocating a great deal of memory and releasing it all at once; in other words, identifying places where the program needs to flush memory more often. If you're using ObjectAlloc, and you notice a category has a very high peak value and low current value, then that's a sign that some optimization is in order. But it's not the sign of a memory leak.

If you're having a problem with memory leaks, you should use either the "leaks" command line tool or MallocDebug. If you use "leaks", you should be running your program in the debugger so that you can use GDB to investigate the memory addresses that the tool prints out.

Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Best way to find memory leaks (From: Ken Tozier <email@hidden>)

  • Prev by Date: Best way to find memory leaks
  • Next by Date: Is anyone using an object database?
  • Previous by thread: Re: Best way to find memory leaks
  • Next by thread: Best way to find memory leaks
  • Index(es):
    • Date
    • Thread