JVM和DVM都提供虚拟环境。 JVM不需要在每个过程中。 为什么DVM需要在每个过程中？ 谢谢。
JVM and DVM both provide virtual environment. JVM doesn't need to be in every process. why DVM need to be in every process? Thanks.
Neither DVM nor JVM runs on every processes. Natively compiled applications (e.g. the ones you see inside Terminal Emulator) are not associated with any DVM or JVM.
And even when you only count Android "apk" applications, the overhead of having JVM/DVM on (nearly) every process' address space is minimal since they are a shared dynamic library so Linux will smartly load them once in a copy-on-write buffer for the whole OS.
Android applications run Dalvik bytecode, so the DVM needs to be running. Just like how running Java bytecode on a PC requires a JVM to run.