Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6882091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:12:37+00:00 2026-05-27T05:12:37+00:00

I am Profiling an Application with Instruments. The profiling is done using Allocations Tool

  • 0

I am Profiling an Application with Instruments. The profiling is done using Allocations Tool in two ways:

  1. By choosing Directly the Allocations when I run the App for Profiling
  2. By Choosing Leaks when I run the App for Profiling.

In both the cases , I had Allocations tool enabled for testing. But surprisingly , I had two different kind of Out put for Allocations at these instances.

Are they supposed to behave differently? or this is a problem with Instruments.

The time I Profile the with Leaks Tool:

In Allocations Graph:
enter image description here
1. I get lot of Peaks in Graph, The Live bytes and overall bytes are same.
2. I get the Black flags (I think it alarms about memory warning) after 1 minutes usage. Then after a set of flags appearing, my App Crashes. (This happens at times, even when directly run the App in Device)

The time I Profile the with Allocation Tool:

In Allocations Graph:
enter image description here
1. I do not get peaks often as it was in the above case. The Live bytes was always way less than Overall bytes.
2. I have used for over 20 minutes and never got Black flags.

One fact I came to know is that, when Live bytes and overall bytes are equal, the NSZombieEnabled could be enabled.

Have any of you ever encountered this problem.

UPDATE 1:

I faced another problem with first case. Whenever I profiled after a short duration (compared to profiling in second case), the app got lots of Black Flags and my App Crashed. (Due to Memory warning)

And when I tried the similar step by step use of Application my Application did not crash and got no flags.

Why this discrepancy?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T05:12:38+00:00Added an answer on May 27, 2026 at 5:12 am

    In the first case, you are only tracking live allocations because the “Leaks” template configures the Allocations instrument that way. In the second, you are tracking both live and deallocated allocations. (As CocoaFu said).

    Both are useful, but for slightly different reasons.

    Only tracking live allocations (in combination with Heapshot Analysis, typically), is a great way to analyze permanent heap growth in your application. Once you know what is sticking around forever, you can figure out why and see if there are ways to optimize it away.

    Tracking all allocations, alive and dead, is a very effective means of tracking allocation bandwidth. You can sort by overall bytes and start with the largest #. Have a look at all the points of allocation (click the little arrow next to the label in the Category of the selected row), and see where all the allocations are coming from.

    For example, your graph shows that there are 1.27MB of 14 byte allocations — 9218 allocations — over that period of time. All have been free()d [good!], but that still represents a bunch of work to allocate, fill with data (presumably), and free each one of those. It may be a problem, maybe not.

    (To put this in perspective, I used this technique to optimize an application. By merely focusing on reducing the # of transient — short lived — allocations, I was able to make the primary algorithms of the application 5x faster and reduce memory use by 85%. Turns out the app was copying strings many, many, times.)


    Not sure why your app crashed as you described. Since it is a memory warning, you should see what is most frequently allocated.

    Keep in mind that if you have zombie detection enabled, that takes a lot of additional memory.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am profiling an application suddenly using a lot of memory, and i am
Is there any recommended Java application profiling tutorial? I am now using JProfiler and
Shark on Mac OS X is a great tool for profiling an application on
I am working on profiling a legacy application using Spring AOP and I want
I recently began profiling an osgi java application that I am writing using VisualVM.
I was experimenting a lot with application profiling lately (using Visual Studio Performance Wizard).
I'm profiling my application using VisualVM and I see that the heap size increased
I am developing an application using WPF. The app runs full screen, and I
I am using unsigned long to collect performance data while profiling an application as
I'm currently profiling an application with performance problems using Valgrind's Callgrind. In looking at

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.