Why does Android Apps Running show vastly more memory for my app than the Android Studio monitor?

My Xamarin Forms app has 1 service and its UI. Here I killed the service and the app then restarted it from the XS debugger.
Then I attached to the process with Android Studio.

In the Settings -> Apps -> Running I see 115 MB, but in AS I see 8.83 MB. Whats going on? In normal use I have seen the app get to 300MB+ so I'm concerned there may be a leak, but first I need to trust the measurements.

How do I interprete these measurements? 115MB certainly looks bad to users. Does anything look excessive or out of place?

Thanks for any help.

Here is another snapshot from AS.

Applications Memory Usage (kB):
Uptime: 9466568 Realtime: 9466568

** MEMINFO in pid 26451 [co.freewheeler.freexam] **
Pss Private Private Swapped Heap Heap Heap
Total Dirty Clean Dirty Size Alloc Free
------ ------ ------ ------ ------ ------ ------
Native Heap 59869 59728 0 0 77824 70120 7703
Dalvik Heap 8403 8336 0 0 12868 8941 3927
Dalvik Other 300 300 0 0
Stack 332 332 0 0
Other dev 4 0 4 0
.so mmap 3948 176 3032 0
.jar mmap 0 0 0 0
.apk mmap 3053 0 2448 0
.ttf mmap 8 0 0 0
.dex mmap 4423 0 4000 0
.oat mmap 1119 0 40 0
.art mmap 1086 576 0 0
Other mmap 21215 4 21196 0
Unknown 14271 14268 0 0
TOTAL 118031 83720 30720 0 90692 79061 11630

Objects
Views: 70 ViewRootImpl: 1
AppContexts: 5 Activities: 1
Assets: 10 AssetManagers: 10
Local Binders: 12 Proxy Binders: 15
Parcel memory: 3 Parcel count: 14
Death Recipients: 0 OpenSSL Sockets: 0

SQL
MEMORY_USED: 0
PAGECACHE_OVERFLOW: 0 MALLOC_SIZE: 0

Asset Allocations
zip:/data/app/co.freewheeler.freexam-1/base.apk:/assets/Roboto-Regular.ttf: 159K
zip:/data/app/co.freewheeler.freexam-1/base.apk:/assets/Roboto-Regular.ttf: 159K
zip:/data/app/co.freewheeler.freexam-1/base.apk:/assets/Roboto-Regular.ttf: 159K
zip:/data/app/co.freewheeler.freexam-1/base.apk:/assets/Roboto-Regular.ttf: 159K
zip:/data/app/co.freewheeler.freexam-1/base.apk:/assets/Roboto-Regular.ttf: 159K
zip:/data/app/co.freewheeler.freexam-1/base.apk:/assets/Roboto-Regular.ttf: 159K
zip:/data/app/co.freewheeler.freexam-1/base.apk:/assets/Roboto-Regular.ttf: 159K

Sign In or Register to comment.