On 09/14/2011 07:13 PM, Matt Y. wrote:
> 
> 
> On Thu, Sep 15, 2011 at 9:59 AM, Pratik Prajapati
> <pratik.prajap...@gmail.com <mailto:pratik.prajap...@gmail.com>> 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: android-kernel+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-kernel

Reply via email to