@mycall
#1.

The below code mean that every applications on VM start with 2Mb heap
size. correct.?
=>Yes
And If I want to change initial heap size for every application, I can
do it directly. correct.?
=>Yes
And according to comment, we can pass argument for heap size but in
fact there is no way to pass the parameter
because the VM is embedded in the Android runtime, not launched on the
command line.  correct.?
=>AFAIK, Yes.

#2.

I searched for CUSTOM_RUNTIME_HEAP_MAX in frameworks/base/core/jni/
AndroidRuntime.cpp but I can't find at all.  ( My platform code is
ecliar. )
Now I just found below code and then I think it means max heap size,
16MB. correct.?
=>Yes
16m -> mega byte or mega bit .??
=>B means byte

    property_get("dalvik.vm.heapsize", heapsizeOptsBuf+4, "16m");

In my project, I also found below code in android make( *.mk ) file.

    ADDITIONAL_BUILD_PROPERTIES += dalvik.vm.heapsize=32m

Two codes cause same action.correct.? and 32m -> mega byte or mega
bit .?
=>Yes

#3. ( last )
Actually, I don't understand below sentence.
Is it possible to resize heap size in which case there is only one
tread running.?

The less-easy but better approach would be to resize the various heap
structures, which is a bit awkward but
probably doable since there's only thread running at that point where
the zygote forks.
=> I do not believe heap size has something to do with thread number.

-- 
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

Reply via email to