Hi fadden, Sorry for not being clearer on my first post.
I'm trying to understand better (through code reading) the startup process of Android. By startup, I mean to understand how the Android Runtime is setup and Dalvik is started. Throughout the code reading process I've found VMRuntime. E.g. Call Stack ... AndroidRuntime::start(...) ... env->CallStaticVoidMethod(startClass, startMeth, strArray); This method invokes com.android.internal.os.ZygoteInit. Then, on ZygoteInit.java main() method there is the preloadClasses() method. This is where VMRuntime appears. final VMRuntime runtime = VMRuntime.getRuntime(); Then, I've tried to figure out what properties does this object holds, and I've found a singleton that, in the java side, represents an empty object which reference is returned through the getRuntime() method. Well, as I was trying to understand in detail what this VMRuntime object represents, initially I thought that it could be related to JNI Call Bridge, but according to your answer it is not. Therefore, I'm assuming that there must be a library or C/C++ code that is invoked when getRuntime() or other VMRuntime class method is called. And this is still my question. How/Where is this object mapped to native code? Sorry for the long reply. If I was not clear enough please tell me and then, I will try to figure out a simple way to explain my problem. Cheers, On Nov 30, 8:44 pm, fadden <[email protected]> wrote: > On Nov 30, 9:08 am, bacchus <[email protected]> wrote: > > > I'm looking for specific information about Android JNI Call Bridge. > > The one that exists does not suffices my needs. > > The "JNI call bridge" is a bit of code that converts an array of 32- > bit values into C-style arguments. It takes into account host- > specific calling conventions, notably which arguments go into which > registers (by type or position), which go onto the stack, and how > values should be padded. > > The sources include a version based on libffi (slow) and a few CPU- > specific implementations (ARM EABI, SH4, x86). > > > I would like to understand the mappings performed between C/C++ data > > types and Java data types. > > > As an example, I would like to understand where and how the VMRuntime > > object is defined and mapped. > > This is beyond the scope of the JNI function call interface. If you > want higher-level object to interact more directly, you may need to > look into Cygnus CNI (requires compiler support) or JNA (convenience, > but at a price). > > Was there something specific about VMRuntime that interested you? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

