我在 android 中创建了一个空项目。然后我用一个有硬件加速的模拟器运行它。
50% 已经分配。其中最小的空闲内存块只有区区 174 KB。
这是为什么?
最佳答案
因为VM还没有分配更多。如果您的内存占用量增加,您的堆大小也会增加。如果我没记错的话,硬件加速还会将渲染器的某些部分拉入您的进程,这就是为什么已经使用了多达 2.5 MB 的内存。
By rendering all of an app’s animations and UI with the GPU, the system takes a hit to memory usage. Loading up the OpenGL drivers for each process takes memory usage of roughly 2MB,
http://www.extremetech.com/computing/107995-the-truth-about-hardware-acceleration-on-android
关于java - 为什么空项目有很大的内存分配?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16329369/