Merge change 21862 into eclair
* changes: Fix issue #2010965: Increase process size on WVGA devices
This commit is contained in:
@@ -525,6 +525,7 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv)
|
|||||||
char dexoptFlagsBuf[PROPERTY_VALUE_MAX];
|
char dexoptFlagsBuf[PROPERTY_VALUE_MAX];
|
||||||
char enableAssertBuf[sizeof("-ea:")-1 + PROPERTY_VALUE_MAX];
|
char enableAssertBuf[sizeof("-ea:")-1 + PROPERTY_VALUE_MAX];
|
||||||
char jniOptsBuf[sizeof("-Xjniopts:")-1 + PROPERTY_VALUE_MAX];
|
char jniOptsBuf[sizeof("-Xjniopts:")-1 + PROPERTY_VALUE_MAX];
|
||||||
|
char heapsizeOptsBuf[sizeof("-Xmx")-1 + PROPERTY_VALUE_MAX];
|
||||||
char* stackTraceFile = NULL;
|
char* stackTraceFile = NULL;
|
||||||
bool checkJni = false;
|
bool checkJni = false;
|
||||||
bool checkDexSum = false;
|
bool checkDexSum = false;
|
||||||
@@ -597,16 +598,10 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv)
|
|||||||
mOptions.add(opt);
|
mOptions.add(opt);
|
||||||
//options[curOpt++].optionString = "-verbose:class";
|
//options[curOpt++].optionString = "-verbose:class";
|
||||||
|
|
||||||
#ifdef CUSTOM_RUNTIME_HEAP_MAX
|
strcpy(heapsizeOptsBuf, "-Xmx");
|
||||||
#define __make_max_heap_opt(val) #val
|
property_get("dalvik.vm.heapsize", heapsizeOptsBuf+4, "16m");
|
||||||
#define _make_max_heap_opt(val) "-Xmx" __make_max_heap_opt(val)
|
//LOGI("Heap size: %s", heapsizeOptsBuf);
|
||||||
opt.optionString = _make_max_heap_opt(CUSTOM_RUNTIME_HEAP_MAX);
|
opt.optionString = heapsizeOptsBuf;
|
||||||
#undef __make_max_heap_opt
|
|
||||||
#undef _make_max_heap_opt
|
|
||||||
#else
|
|
||||||
/* limit memory use to 16MB */
|
|
||||||
opt.optionString = "-Xmx16m";
|
|
||||||
#endif
|
|
||||||
mOptions.add(opt);
|
mOptions.add(opt);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user