Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 61691572 authored by Steve Kondik's avatar Steve Kondik
Browse files

Look at persist.sys.vm.heapsize as well as dalvik.vm.heapsize.

parent 8e7d4934
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -656,8 +656,12 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv)
    //options[curOpt++].optionString = "-verbose:class";

    strcpy(heapsizeOptsBuf, "-Xmx");
    property_get("dalvik.vm.heapsize", heapsizeOptsBuf+4, "16m");
    //LOGI("Heap size: %s", heapsizeOptsBuf);
    property_get("persist.sys.vm.heapsize", propBuf, "");
    if (strcmp(propBuf, "") == 0) {
        property_get("dalvim.vm.heapsize", propBuf, "16m");
    }
    strcpy(heapsizeOptsBuf+4, propBuf);
    LOGI("Heap size: %s", heapsizeOptsBuf);
    opt.optionString = heapsizeOptsBuf;
    mOptions.add(opt);