I think Tim meant the 'core' class library, which is pre-loaded into memory
for the purposes that Tim has mentioned. You can check the
file frameworks/base/core/java/com/android/internal/os/ZygoteInit.java.

William Liang

2011/9/16 Pratik Prajapati <[email protected]>

>
>
> On Thu, Sep 15, 2011 at 10: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
>>
>>
> You mean to say, even if no objects are created and still classes occupy
> memory? Please let me know how you have checked it.
> -- Pratik
>
>>
>> =============================
>> 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
>>
>
>
>
> --
> Regards,
> Pratik Prajapati
> Cell: +1-949-351-8370
>
>
>  --
> unsubscribe: [email protected]
> website: http://groups.google.com/group/android-kernel
>

-- 
unsubscribe: [email protected]
website: http://groups.google.com/group/android-kernel

Reply via email to