emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 4c7df43: Correct units and spacing in memory-report


From: Mattias Engdegård
Subject: master 4c7df43: Correct units and spacing in memory-report
Date: Sat, 19 Dec 2020 11:04:39 -0500 (EST)

branch: master
commit 4c7df434a0410a46157743045255c03395231cc6
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>

    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 04ae87d..b532ddc 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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]