diff options
author | Andrea Corallo <akrl@sdf.org> | 2020-12-20 22:07:48 +0100 |
---|---|---|
committer | Andrea Corallo <akrl@sdf.org> | 2020-12-20 22:08:42 +0100 |
commit | f244c2190259875d095be8508a959a61339263b8 (patch) | |
tree | 4e32bd399f4abe168bf3f18086cd36acfbca3df8 /lisp/emacs-lisp/memory-report.el | |
parent | 72c1a41573a96a39482a001bfeb3230c471a5681 (diff) | |
parent | 1a7033f1f3de4ad8c1bfd68b54e6c9d8444a3bcc (diff) | |
download | emacs-f244c2190259875d095be8508a959a61339263b8.tar.gz emacs-f244c2190259875d095be8508a959a61339263b8.tar.bz2 emacs-f244c2190259875d095be8508a959a61339263b8.zip |
Merge remote-tracking branch 'savannah/master' into HEAD
Diffstat (limited to 'lisp/emacs-lisp/memory-report.el')
-rw-r--r-- | lisp/emacs-lisp/memory-report.el | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/memory-report.el b/lisp/emacs-lisp/memory-report.el index c88d9f2768a..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)) @@ -294,7 +294,9 @@ by counted more than once." (overlay-lists))))) (defun memory-report--image-cache () - (list (cons "Total Image Cache Size" (image-cache-size)))) + (list (cons "Total Image Cache Size" (if (fboundp 'image-cache-size) + (image-cache-size) + 0)))) (provide 'memory-report) |