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

Commit e6c2241f authored by Mathieu Chartier's avatar Mathieu Chartier
Browse files

Launch VM with -XX:LowMemoryMode if ro.config.low_ram is "true".

Bug: 10131789

Change-Id: Ib9962f7becdedd71f48123a4720dcce1d09abb9d
parent 59bbba7c
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -589,6 +589,12 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv)
        mOptions.add(opt);
    }

    property_get("ro.config.low_ram", propBuf, "");
    if (strcmp(propBuf, "true") == 0) {
      opt.optionString = "-XX:LowMemoryMode";
      mOptions.add(opt);
    }

    /*
     * Enable or disable dexopt features, such as bytecode verification and
     * calculation of register maps for precise GC.