yes, many basis classes are loaded when zygote process starts. but how do you get the number 1800?
On Fri, Sep 16, 2011 at 1:16 AM, Tim Bird <[email protected]> wrote: > On 09/14/2011 07:13 PM, Matt Y. wrote: > > > > > > On Thu, Sep 15, 2011 at 9:59 AM, Pratik Prajapati > > <[email protected] <mailto:[email protected]>> wrote: > > > > Dear All, > > > > There are a lot of classes in my (big) APK which are used no > > where(some test code is part of the APK with the actual service). > > Will dalvik VM keep these classes in memory at runtime? ( many > > classes are not used to create any object out of them). > > > > > > only when classes are used, dvm loads these classes into memory. > > If only this were true. Unfortunately, a large number of classes > (over 1800) are preloaded by zygote at startup time, to share memory > between android processes, and to reduce subsequent application > startup time. > > I'm not familiar with the DEX-combining mentioned, but I do know > for sure that a large number of (potentially unused) classes are > lying around in memory most of the time. (At least, in Android 2.3) > -- Tim > > > ============================= > Tim Bird > Architecture Group Chair, CE Workgroup of the Linux Foundation > Senior Staff Engineer, Sony Network Entertainment > ============================= > > -- > unsubscribe: [email protected] > website: http://groups.google.com/group/android-kernel > -- unsubscribe: [email protected] website: http://groups.google.com/group/android-kernel
