App Memory Usage differs between Devices

折月煮酒 提交于 2019-12-12 17:06:06

问题


I run my App in two different devices and check from Android Studio's Memroy tab the app's allocated memory. When the app runs in the Samsung device, the allocated memory is about 60 MB. When the app runs in the Motorola device, the allocated memory is about 40 MB.

What causes this differnce in memory allocation?

Devices: Samsung Galaxy S4 with 5.0.1 Android Version

Motorola Moto G2 with 5.0.2 Android Version


回答1:


Samsung has additional layer of libraries for their custom UI on Android, which will eventually lead the app to consume more memory.

Moto devices have stock/native Android.

Your variables and objects take x memory in both devices, but your UI elements take more memory in Samsung in comparison to moto device.

examplel: If stock android uses Button class, Samsung will extend the Button class to make SamsungButton class which will have additional features (like water droplet sound on click).



来源:https://stackoverflow.com/questions/33346721/app-memory-usage-differs-between-devices

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!