From: Mattias EngdegÄrd Date: Sat, 19 Dec 2020 15:24:55 +0000 (+0100) Subject: Correct units and spacing in memory-report X-Git-Tag: emacs-28.0.90~4655 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4c7df434a0410a46157743045255c03395231cc6;p=emacs.git Correct units and spacing in memory-report * lisp/emacs-lisp/memory-report.el (memory-report--format): Use IEC unit prefixes and a space before. --- 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))