Function: window-tool-bar--insert-memory-use

window-tool-bar--insert-memory-use is a byte-compiled function defined in window-tool-bar.el.gz.

Signature

(window-tool-bar--insert-memory-use LABEL AVG-MEMORY-USE)

Documentation

Insert memory use into current buffer.

LABEL is a prefix string to be in front of the data. AVG-MEMORY-USE is a list of averages, with the same meaning as memory-use-counts.

Source Code

;; Defined in /usr/src/emacs/lisp/window-tool-bar.el.gz
(defun window-tool-bar--insert-memory-use (label avg-memory-use)
  "Insert memory use into current buffer.

LABEL is a prefix string to be in front of the data.
AVG-MEMORY-USE is a list of averages, with the same meaning as
`memory-use-counts'."
  (let* ((label-len (length label))
         (padding (make-string label-len ?\s)))
    (cl-loop for usage in avg-memory-use
             for usage-label in '("Conses" "Floats" "Vector cells" "Symbols"
                                  "String chars" "Intervals" "Strings")
             for idx from 0
             do (insert (format "%s  %8.2f %s\n"
                                (if (= idx 0) label padding)
                                usage
                                usage-label)))))