diff options
Diffstat (limited to 'core/jni')
| -rw-r--r-- | core/jni/AndroidRuntime.cpp | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp index 8472705..a17b301 100644 --- a/core/jni/AndroidRuntime.cpp +++ b/core/jni/AndroidRuntime.cpp @@ -372,19 +372,6 @@ static int hasDir(const char* dir) } /* - * We just want failed write() calls to just return with an error. - */ -static void blockSigpipe() -{ - sigset_t mask; - - sigemptyset(&mask); - sigaddset(&mask, SIGPIPE); - if (sigprocmask(SIG_BLOCK, &mask, NULL) != 0) - ALOGW("WARNING: SIGPIPE not blocked\n"); -} - -/* * Read the persistent locale. */ static void readLocale(char* language, char* region) @@ -589,6 +576,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. @@ -814,8 +807,6 @@ void AndroidRuntime::start(const char* className, const char* options) ALOGD("\n>>>>>> AndroidRuntime START %s <<<<<<\n", className != NULL ? className : "(unknown)"); - blockSigpipe(); - /* * 'startSystemServer == true' means runtime is obsolete and not run from * init.rc anymore, so we print out the boot start event here. |
