Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does Asset Allocations mean in adb shell dumpsys meminfo

Tags:

android

Can anybody tell me what does Asset Allocations mean in adb shell dumpsys meminfo Android? I see this at start up my android device and I see my application's resources.arsc is consuming 516K even though my app is not running.

Thanks.

like image 340
CommonMan Avatar asked Nov 14 '22 17:11

CommonMan


1 Answers

With resources.arsc, there are two things that can happen.

Normally, the file is stored in the .apk uncompressed. Android mmap()s the file and just reads from it as necessary, without loading the whole file into RAM.

If it's compressed however, direct random access into the file is no longer an option, so it gets decompressed and kept in memory for further operations (e.g. loading a string).

I'm not sure why this would be the case if the app is not running. Perhaps it's kept around as a background process?

like image 193
Vlad Avatar answered Feb 23 '23 22:02

Vlad