Loading core/java/android/os/Debug.java +3 −1 Original line number Diff line number Diff line Loading @@ -2059,7 +2059,9 @@ public final class Debug /** @hide */ public static final int MEMINFO_CMA_FREE = 25; /** @hide */ public static final int MEMINFO_COUNT = 26; public static final int MEMINFO_SWAP_CACHED = 26; /** @hide */ public static final int MEMINFO_COUNT = 27; /** * Retrieves /proc/meminfo. outSizes is filled with fields Loading core/java/com/android/internal/util/MemInfoReader.java +2 −1 Original line number Diff line number Diff line Loading @@ -108,7 +108,8 @@ public final class MemInfoReader { kReclaimable = mInfos[Debug.MEMINFO_SLAB_RECLAIMABLE]; } return mInfos[Debug.MEMINFO_BUFFERS] + kReclaimable + mInfos[Debug.MEMINFO_CACHED] - mInfos[Debug.MEMINFO_MAPPED]; + mInfos[Debug.MEMINFO_CACHED] - mInfos[Debug.MEMINFO_MAPPED] + mInfos[Debug.MEMINFO_SWAP_CACHED]; } /** Loading core/jni/android_os_Debug.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -406,6 +406,7 @@ enum { MEMINFO_INACTIVE_FILE, MEMINFO_CMA_TOTAL, MEMINFO_CMA_FREE, MEMINFO_SWAP_CACHED, MEMINFO_COUNT }; Loading Loading
core/java/android/os/Debug.java +3 −1 Original line number Diff line number Diff line Loading @@ -2059,7 +2059,9 @@ public final class Debug /** @hide */ public static final int MEMINFO_CMA_FREE = 25; /** @hide */ public static final int MEMINFO_COUNT = 26; public static final int MEMINFO_SWAP_CACHED = 26; /** @hide */ public static final int MEMINFO_COUNT = 27; /** * Retrieves /proc/meminfo. outSizes is filled with fields Loading
core/java/com/android/internal/util/MemInfoReader.java +2 −1 Original line number Diff line number Diff line Loading @@ -108,7 +108,8 @@ public final class MemInfoReader { kReclaimable = mInfos[Debug.MEMINFO_SLAB_RECLAIMABLE]; } return mInfos[Debug.MEMINFO_BUFFERS] + kReclaimable + mInfos[Debug.MEMINFO_CACHED] - mInfos[Debug.MEMINFO_MAPPED]; + mInfos[Debug.MEMINFO_CACHED] - mInfos[Debug.MEMINFO_MAPPED] + mInfos[Debug.MEMINFO_SWAP_CACHED]; } /** Loading
core/jni/android_os_Debug.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -406,6 +406,7 @@ enum { MEMINFO_INACTIVE_FILE, MEMINFO_CMA_TOTAL, MEMINFO_CMA_FREE, MEMINFO_SWAP_CACHED, MEMINFO_COUNT }; Loading