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

Commit 66d298ca authored by Thierry Strudel's avatar Thierry Strudel Committed by Android (Google) Code Review
Browse files

Merge "Do not account ZRAM physical memory as Lost RAM"

parents 3360de1e 8dcf59d6
Loading
Loading
Loading
Loading
+6 −7
Original line number Original line Diff line number Diff line
@@ -15808,18 +15808,17 @@ public final class ActivityManagerService extends ActivityManagerNative
                    pw.println(totalPss - cachedPss);
                    pw.println(totalPss - cachedPss);
                }
                }
            }
            }
            long lostRAM = memInfo.getTotalSizeKb()
                    - totalPss - memInfo.getFreeSizeKb() - memInfo.getCachedSizeKb()
                    - memInfo.getKernelUsedSizeKb() - memInfo.getZramTotalSizeKb();
            if (!isCompact) {
            if (!isCompact) {
                pw.print(" Used RAM: "); pw.print(stringifyKBSize(totalPss - cachedPss
                pw.print(" Used RAM: "); pw.print(stringifyKBSize(totalPss - cachedPss
                        + memInfo.getKernelUsedSizeKb())); pw.print(" (");
                        + memInfo.getKernelUsedSizeKb())); pw.print(" (");
                pw.print(stringifyKBSize(totalPss - cachedPss)); pw.print(" used pss + ");
                pw.print(stringifyKBSize(totalPss - cachedPss)); pw.print(" used pss + ");
                pw.print(stringifyKBSize(memInfo.getKernelUsedSizeKb())); pw.print(" kernel)\n");
                pw.print(stringifyKBSize(memInfo.getKernelUsedSizeKb())); pw.print(" kernel)\n");
                pw.print(" Lost RAM: "); pw.println(stringifyKBSize(memInfo.getTotalSizeKb()
                pw.print(" Lost RAM: "); pw.println(stringifyKBSize(lostRAM));
                        - totalPss - memInfo.getFreeSizeKb() - memInfo.getCachedSizeKb()
                        - memInfo.getKernelUsedSizeKb()));
            } else {
            } else {
                pw.print("lostram,"); pw.println(memInfo.getTotalSizeKb()
                pw.print("lostram,"); pw.println(lostRAM);
                        - totalPss - memInfo.getFreeSizeKb() - memInfo.getCachedSizeKb()
                        - memInfo.getKernelUsedSizeKb());
            }
            }
            if (!brief) {
            if (!brief) {
                if (memInfo.getZramTotalSizeKb() != 0) {
                if (memInfo.getZramTotalSizeKb() != 0) {
@@ -16117,7 +16116,7 @@ public final class ActivityManagerService extends ActivityManagerNative
        memInfoBuilder.append("  Lost RAM: ");
        memInfoBuilder.append("  Lost RAM: ");
        memInfoBuilder.append(stringifyKBSize(memInfo.getTotalSizeKb()
        memInfoBuilder.append(stringifyKBSize(memInfo.getTotalSizeKb()
                - totalPss - memInfo.getFreeSizeKb() - memInfo.getCachedSizeKb()
                - totalPss - memInfo.getFreeSizeKb() - memInfo.getCachedSizeKb()
                - memInfo.getKernelUsedSizeKb()));
                - memInfo.getKernelUsedSizeKb() - memInfo.getZramTotalSizeKb()));
        memInfoBuilder.append("\n");
        memInfoBuilder.append("\n");
        Slog.i(TAG, "Low on memory:");
        Slog.i(TAG, "Low on memory:");
        Slog.i(TAG, shortNativeBuilder.toString());
        Slog.i(TAG, shortNativeBuilder.toString());