summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Minchan Kim <minchan@google.com> 2019-07-10 05:20:45 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2019-07-10 05:20:45 +0000
commitd8fd3f8e43c7cf5bc5015d4ef1fbc2c26c4c257c (patch)
tree30309ed9aa1ff20bf3ac37570ba753f7425c9316
parenta44fe677dc91ee26a1471014c4364f5f5b597dcd (diff)
parent49813529f7ba0845ae27fe7e03a85e673a4e2385 (diff)
Merge "skip reading vmallocinfo if not needed" into qt-r1-dev
-rw-r--r--core/jni/android_os_Debug.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/jni/android_os_Debug.cpp b/core/jni/android_os_Debug.cpp
index 14dbabb1ce02..c3e7a36bef78 100644
--- a/core/jni/android_os_Debug.cpp
+++ b/core/jni/android_os_Debug.cpp
@@ -575,7 +575,7 @@ static void android_os_Debug_getMemInfo(JNIEnv *env, jobject clazz, jlongArray o
if (outArray != NULL) {
outLen = MEMINFO_COUNT;
for (int i = 0; i < outLen; i++) {
- if (i == MEMINFO_VMALLOC_USED) {
+ if (i == MEMINFO_VMALLOC_USED && mem[i] == 0) {
outArray[i] = smi.ReadVmallocInfo() / 1024;
continue;
}