From 4c7df434a0410a46157743045255c03395231cc6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mattias=20Engdeg=C3=A5rd?= Date: Sat, 19 Dec 2020 16:24:55 +0100 Subject: [PATCH] Correct units and spacing in memory-report * lisp/emacs-lisp/memory-report.el (memory-report--format): Use IEC unit prefixes and a space before. --- lisp/emacs-lisp/memory-report.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/emacs-lisp/memory-report.el b/lisp/emacs-lisp/memory-report.el index 04ae87d9ea0..b532ddc56c5 100644 --- a/lisp/emacs-lisp/memory-report.el +++ b/lisp/emacs-lisp/memory-report.el @@ -232,11 +232,11 @@ by counted more than once." (defun memory-report--format (bytes) (setq bytes (/ bytes 1024.0)) - (let ((units '("kB" "MB" "GB" "TB"))) + (let ((units '("KiB" "MiB" "GiB" "TiB"))) (while (>= bytes 1024) (setq bytes (/ bytes 1024.0)) (setq units (cdr units))) - (format "%6.1f%s" bytes (car units)))) + (format "%6.1f %s" bytes (car units)))) (defun memory-report--gc-elem (elems type) (* (nth 1 (assq type elems)) -- 2.39.2