0

I am trying to figure out real consumption of my app for that I created sample app to observe things. But I am not able to understand the results from xamarin profiler.

below screenshot shows that memory allocated 1,5mb but when I click only live objects, it shows 510kb. What is the difference? Does it mean app is only using 510kb but in general allocated 1,5mb? on a larger app this difference is more significant. On my App I see memory allocation up to 200mb when Only live objects is 10mb. it is huge difference.

enter image description here

enter image description here

On the other hand, xamarin says that take snapshots and compare differences. As advised, I did just like that but results are not clear for me. Size Growth is always increasing even Object Growth reduces. why is that? App is quite basic, there 2 pages, Snapshot 2 to Snapshot 3 is taken after popping page 2 to page 1. How can it be that size growth is increasing If I am popping a page?

UPDATE:

Extended question here. When I click "Only Live Objects" as shown in the image, it displays Memory Allocated 9,5mb. if they are live objects, I understand that this is the current memory usage by managed code at least? Is that true?

enter image description here

enter image description here

Emil
  • 6,411
  • 7
  • 62
  • 112

1 Answers1

1

What is the difference? Does it mean app is only using 510kb but in general allocated 1.5mb?

Objects allocated are all objects that have been created since application start (or reset).

The live objects are those objects that haven't been reclaimed by the garbage collector. This may include objects that are unreachable, and will definitely include objects that are still in use by the application.

Size Growth is always increasing even Object Growth reduces. why is that?

It did increasing all time, but I think it's not compared with the previous snapshot, it was compared with a baseline, that's why it always positive. You could try compare these Size Growth value with snapshot 1's value , as illustrated in the following diagram :

enter image description here

Update :

Working Set : refers to the total physical memory (RAM) used by the process. You could refer to my answer :

What is the normal memory-ram size?(xamarin)

Community
  • 1
  • 1
York Shen
  • 9,014
  • 1
  • 16
  • 40
  • in xamarin university video they say that working sets are the actual memory used by the app, is that true? It also always increases for me even if I pop from a page. – Emil Dec 11 '17 at 03:33
  • @batmaci, as I understant, it is. – York Shen Dec 12 '17 at 00:22