The other thing, of course, is that if Dalvik is aware of linux (and
even if
it's not), you can have ONE VM in memory running as multiple users,
because
that's what linux is good at - the executable code lives in the kernel
context
and the data space lives in the user context.
Only if
you want to make Dalvik run in kernel space, which it
doesn't.
Each program thinks it has its own VM. Linux knows
better but it hides that fact
from user space.
No, as the
documentation and the 'ps' tool will confirm, each app actually has a unique DVM
process, running under it's own userid.
The "magic" is that this process was
not created by exec, but instead by forking off from zygote and the changing the
userid of a process which inherits shared read-only mappings of the actual code
of the DVM and most of the system libraries (both dalvik and native).
It's
actually a unique DVM running as a unique process, but it shares as much
read-only information as possible with other DVMs running under other userids in
other processes, in order to minimize the memory footprint.
Check the docs
if you don't believe me. [ Reply to This | Parent | # ]
|