From 290811af4bce710cae8c70f4124da05c871f077b Mon Sep 17 00:00:00 2001 From: Sandeep Patil Date: Fri, 31 May 2019 10:33:59 -0700 Subject: [PATCH] Fix stack memory accounting for dumpsys The bug was introduced in refactor done for libmeminfo and stack memory was getting accounted as native heap as a result. Test: 'dumpsys meminfo' show non-zero Stack memory in 'Total PSS by category Bug: 132664087 Change-Id: Ifb8418bd9d2e65abc09aa4075d85fd5afc56b57a Signed-off-by: Sandeep Patil --- core/jni/android_os_Debug.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/jni/android_os_Debug.cpp b/core/jni/android_os_Debug.cpp index 69a7c4d805328..a67cb34e19dd7 100644 --- a/core/jni/android_os_Debug.cpp +++ b/core/jni/android_os_Debug.cpp @@ -258,7 +258,7 @@ static void load_maps(int pid, stats_t* stats, bool* foundSwapPss) } else if (base::StartsWith(name, "[anon:libc_malloc]")) { which_heap = HEAP_NATIVE; } else if (base::StartsWith(name, "[stack")) { - which_heap = HEAP_NATIVE; + which_heap = HEAP_STACK; } else if (base::EndsWith(name, ".so")) { which_heap = HEAP_SO; is_swappable = true;