• 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
Locating managed objects within ObjectAlloc (was Re: Garbage collection, core data, and tight loops)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Locating managed objects within ObjectAlloc (was Re: Garbage collection, core data, and tight loops)


  • Subject: Locating managed objects within ObjectAlloc (was Re: Garbage collection, core data, and tight loops)
  • From: email@hidden
  • Date: Sat, 3 Nov 2007 11:41:46 -0400


On Nov 2, 2007, at 3:01 PM, John R. Timmer wrote:

Using garbage collection resulted in a significant memory gain, but nowhere near bad enough to crash the program. Oddly, the memory use did not subside after the loop had finished.

This sounds like caching behavior that I think I've observed. My app create millions of managed objects during an import process, and I've seen large memory usage that doesn't go down when the objects are dealloced. Looking at backtraces in ObjectAlloc, I see a lot of mallocs in caching functions as various objects are dealloc'ed. If I close the NSPersistentDocument, I get some memory reclaimed, but not what I expect. But, if I repeated run the import (without quitting), the peak memory doesn't go up, so the memory is apparently reused.


This leads me to a question about using ObjectAlloc (in Instruments on Leopard) effectively, especially with respect to Core Data. When looking at allocations, there are a large number of GeneralBlocks of various sizes, but no NSManagedObjects. I have some custom subclasses, too, and those aren't identified either in the Categories column. I want to observe the usage patterns of the various entities in my model, but I'm not sure how to do that. Is there an easy way to filter managed objects?

Thanks,

----
Aaron Burghardt
email@hidden


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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


  • Prev by Date: Re: Wrapping my head around pthreads, nsthreads, and nsnotificationcenter
  • Next by Date: Re: Adding an icon to the dock
  • Previous by thread: Re: FYI - Resolution Independence
  • Next by thread: re: Locating managed objects within ObjectAlloc (was Re: Garbage collection, core data, and tight loops)
  • Index(es):
    • Date
    • Thread