On Jun 15, 2011, at 10:22 AM, Bing Li wrote: > In addition, according to Activity Monitor, the memory consumed by the > program increased only when some new threads are added. After the threads > were dead, the memory was lowered to a fixed amount. Is it fine?
Each thread has data structures associated with it, besides any memory you may allocate within the thread, which cannot be freed until the thread terminates (the thread's stack for instance). So it's a question of how much the memory went up. If you want to find out if it's system overhead or your allocations, you could experiment with creating some "empty" threads that just sleep() long enough to give you a chance to watch them, and compare the memory usage to what you see with your real threads. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com