Re: Heapshot Analysis to find Memory Accretion (Leaks)
Re: Heapshot Analysis to find Memory Accretion (Leaks)
- Subject: Re: Heapshot Analysis to find Memory Accretion (Leaks)
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Tue, 19 Oct 2010 10:33:39 +0700
On 18 Oct 2010, at 19:56, Bill Bumgarner <email@hidden> wrote:
> I wrote up an article on how to use the "Mark Heap" / "Heapshot Analysis" tools in Instruments to detect, analyze, and fix memory leaks, including those that leaks can't find.
>
> http://www.friday.com/bbum/2010/10/17/when-is-a-leak-not-a-leak-using-heapshot-analysis-to-find-undesirable-memory-growth/
First of all: Thank you very much for this very helpful article.
I just created a new Cocoa Document based app in Xcode (Version 3.2.4).
I did not edit any of the Xcode supplied files.
Clicked Build and then Run with Performance Tool → Allocations.
The I did 10 times:
New
Close
Click "Mark Heap" in Instruments
But there are several kiloBytes of Heap Growth in (almost) each Heapshot.
These are:
CFBasicHash (value-store)
CFBasicHash (count-store)
<non-object>
None of these have any of my code (except main()) in their respective backtraces.
So, what to do now?
Conclude that AppKit is full of leaks?
Investigate further? If yes, in which direction?
The problem is not with this test app, but with some real apps, where I also see lots of stuff in the Heap Growth column, so that it is rather difficult to recognize things which are caused by errors in my own code.
> Ideally, each "Heapshot" iteration should show 0 growth in almost all cases.
Indeed.
Kind regards,
Gerriet.
_______________________________________________
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