Re: Memory usage: Xcode vs. Instruments, who is right?
Re: Memory usage: Xcode vs. Instruments, who is right?
- Subject: Re: Memory usage: Xcode vs. Instruments, who is right?
- From: Robert Martin <email@hidden>
- Date: Fri, 06 Dec 2013 23:53:15 -0500
I’m truly surprised.
My app, which uses core audio and quicktime, simply grows in its Xcode memory footprint the moment I launch it. Without doing anything in the app, the footprint just grows and grows - if I wait long enough, it passes 100 Megs, and keeps climbing. If I watch the app after I run an archived version in ‘top’ or ActivityMonitor, it does nothing of the sort. It maintains a static footprint of around 20 Megs.
Something must be seriously wrong - I simply don’t believe the Xcode memory report.
Rob
On Dec 6, 2013, at 4:45 PM, Han Ming Ong <email@hidden> wrote:
> Markus,
>
> If your app is running on the Mac, Xcode’s memory report will show the same number as Activity Monitor’s ‘Memory’ number. That’s because Xcode and Activity Monitor (for that matter, /usr/bin/top) make the same system call to understand your app’s memory usage. Of course we don’t have Activity Monitor nor ‘top’ for your iOS app. Regardless, Xcode makes the same system call on iOS to get your app’s memory usage. One of the reasons that you don’t see the memory drop could be because the system has not reclaimed the freed memory from your app. It uses different heuristics to make that determination. Try this : when your app is running and you switch to another app that consumes a lot of memory, check if Xcode reports a drop in memory usage. I wouldn’t rule out a bug in Xcode’s implementation and so please file a bug if you think there is a problem. We would love to investigate the issue.
>
> Xcode records a lot less because it doesn’t want to slow down the target application since you are not in a ‘profiling’ mode per se. Instruments records a lot more info and can know when objects are allocated/deallocated. It can let you know accurately if your application is leaking memory.
>
> I’m not surprised that both Xcode and Instruments report the same high water mark.
>
> In summary, Xcode gives you a live picture of your memory usage trend. Instruments allows you to deep dive to confirm if you are leaking memory or not.
>
> Han Ming
_______________________________________________
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