1

I'm trying to figure out which parts of my app consumes the most RAM on a device. If I use the memory graph in Xcode I see many objects and their sizes, but is there a way to somehow sort them by size? Or is there another tool that can show me this?

Edit: I am familiar with Instruments, but for some reason the Allocations and Leaks instruments give me very odd numbers and most of the allocations appear as just mallocs. It probably has to do with the fact that I'm using Intel Multi OS Engine and most of my logic code is actually written in Java. I dumped an hprof of the java heap and watched it in Android Studio, so it gave me a good picture about the memory usage in the java side. But I wanted something for the obj-c/swift side too. Instruments is not very useful in my case.

Thanks.

Alex Itelman
  • 199
  • 2
  • 11

1 Answers1

1

You can run your program using profiler (CMD+I).
Choose "Leaks" and "Allocations" inside menu.
This tool could help you to know how much memory and which objects/processes waste the most.
These articles could help:

  1. Working with Instruments - Allocations
  2. Profiling Memory Allocations In iOS With Instruments

Where "profile" is enter image description here

Sergey Fedorov
  • 199
  • 1
  • 6
  • I am familiar with Instruments, but for some reason the Allocations and Leaks instruments give me very odd numbers and most of the allocations appear as just mallocs. It probably has to do with the fact that I'm using Intel Multi OS Engine and most of my logic code is actually written in Java. I dumped an hprof of the java heap and watched it in Android Studio, so it gave me a good picture about the memory usage in the java side. But I wanted something for the obj-c/swift side too. Instruments is not very usefull in my case. – Alex Itelman Feb 26 '18 at 14:47
  • @AlexItelman, i don't think i can help you. I never used Multi-OS Engine. – Sergey Fedorov Feb 26 '18 at 14:55
  • That's ok, can you maybe answer my other question here: [link](https://stackoverflow.com/questions/48990831/getting-memory-usage-live-dirty-bytes-in-ios-app-programmatically-not-resident) – Alex Itelman Feb 26 '18 at 15:36