Function: proced-format-rss

proced-format-rss is a byte-compiled function defined in proced.el.gz.

Signature

(proced-format-rss KILOBYTES)

Documentation

Format RSS KILOBYTES in a human readable format.

Source Code

;; Defined in /usr/src/emacs/lisp/proced.el.gz
(defun proced-format-rss (kilobytes)
  "Format RSS KILOBYTES in a human readable format."
  (let ((formatted (proced-format-memory kilobytes)))
    (if-let* ((proced-enable-color-flag)
              (total (car (memory-info)))
              (proportion (/ (float kilobytes) total)))
        (cond ((< proportion proced-low-memory-usage-threshold)
               (propertize formatted 'font-lock-face 'proced-memory-low-usage))
              ((< proportion proced-medium-memory-usage-threshold)
               (propertize formatted 'font-lock-face 'proced-memory-medium-usage))
              (t (propertize formatted 'font-lock-face 'proced-memory-high-usage)))
      formatted)))