这取决于你的配置方式Emulator
如果你有很多RAM
with HAXM
.
这可以提高你的应用程序的性能System.gc()
if Emulator
RAM
超过Device
.
但这不是唯一的事情,你可以配置你的HAXM
加速度HAXM加速文档 https://developer.android.com/studio/run/emulator-acceleration#accel-vm.
解释
Without acceleration, the emulator takes the machine code from the VM and translates it block by block to conform to the architecture of the host computer. This process can be quite slow. But, if the VM and the architecture of the host computer match (such as x86 on x86), the emulator can skip translating the code and simply run it directly on the actual CPU using a hypervisor. In this case, the emulator can approach the speed of the host computer.
解释2
When you create an Android Virtual Device (AVD) in the AVD Manager, you can specify that graphics acceleration occur in hardware or software to emulate the GPU of the virtual device. Hardware acceleration is typically faster. Software acceleration is useful if your computer uses graphics drivers that aren't compatible with the emulator, in which case hardware graphics rendering can be poor or cause the emulator to crash.
The default is to let the emulator decide if it should use hardware or software graphics acceleration based on your computer setup. If the GPU hardware and drivers are compatible, the emulator uses the GPU; otherwise, the emulator uses the CPU to simulate GPU processing.
Graphics: Memory used for graphics buffer queues to display pixels to the screen, including GL surfaces, GL textures, and so on. (Note that this is memory shared with the CPU, not dedicated GPU memory.)
使用 Memory Profiler Doc 查看 Java 堆和内存分配 https://developer.android.com/studio/profile/memory-profiler
那么为什么你的Graphic use
is to 0Mb
是因为Memory Profiler
计算之间共享的内存CPU
and GPU
不致力于GPU
.
0Mb 也是如此,因为您使用hardware
我认为而不是software to emulate the GPU
.