Reputation: 885
I was wondering and googling for an answer, but I didn't find it. So, is newer ART sandboxing apps like Dalvik VM? To be more precise, can image from this link be applied for ART too? http://davidchang168.blogspot.rs/2012/07/android-vm-and-application.html
Upvotes: 2
Views: 407
Reputation: 12301
To be more precise, can image from this link be applied for ART too?
You second question is irrelevant to the first one (sandboxing).
ART, like Dalvik, exploits the paging mechanism, and actually it is even better than its predecessor. This is because the oat code
is pageable, whereas the JITted
code is not, as it is dynamically produced. Therefore, not just framework multimedia, ie images, but also code can be shared between applications.
For this to make sense, imagine the class String
. I bet it is being used by 99% of Android applications. Therefore its code and a small heap of objects is created once, while a device boots up, on boot.oat
and boot.art
images. These images can then be shared among applications, and contain more classes than just the String
class.
When an application attempts to modify something in such a class the copy-on-write
mechanism ensures that the application will get a separate copy of that particular page, while the rest of the apps can continue sharing the original copy of the page.
This page-ability
is good for both memory and performance.
Upvotes: 0
Reputation: 1007339
So, is newer ART sandboxing apps like Dalvik VM?
The Dalvik VM does not sandbox apps. The Android OS sandboxes apps. ART changes the nature of what is executed (AOT-compiled bytecode instead of JIT-compiled bytecode) in the app. It does not change the nature of the Android process model and the sandboxing approach.
To be more precise, can image from this link be applied for ART too?
Yes.
Upvotes: 5