0

In this presentation in slide 5 the libc.so is supposed to be part of the sandbox of every application. However for example in this paper it is stated that the libc is dynamically linked, which means that only during runtime of an application the actual location of the libc is determined and it is shared by all applications.

Is it then correct to say that while every application has access to the libc they all share the same instance of it and they do not have a deep copy of it in their application sandbox ?

And this stands in contrast to the Dalvik VM, for which every app has an own instance of ?

JoachimR
  • 5,150
  • 7
  • 45
  • 50
  • Apps do not have their own instance of the Dalvik VM. They have their own Dalvik heap and objects created on that heap. The VM itself (interpreter, JIT compiler, etc.) and common classes are in the zygote and shared (using copy-on-write AFAIK) with all other processes forked from the zygote. – CommonsWare Jun 03 '14 at 11:50
  • Each process does run its own instance of the VM; but, you are correct that they all share libs/classes which are loaded by zygote for efficiency reasons. The zygote process partially initializes the VM and loads the libs/classes then sits and waits for new app load requests. When it spawns a new app, it forks and the new process finishes initializing the VM and loading the new app's classes, creating binders, etc. so the ActivityManagerService can send it lifecycle events and get it started appropriately. – Larry Schiefer Jun 03 '14 at 12:28
  • Thanks guys. Alright but what about the libc? Is it shared? – JoachimR Jun 03 '14 at 13:57

0 Answers0