From: Lars Ingebrigtsen Date: Thu, 26 May 2022 11:04:50 +0000 (+0200) Subject: Make memory-report not bug out with symbols with positions X-Git-Tag: emacs-29.0.90~1910^2~417 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=06c79dcfcbc634325b688385be95cd5ed049e208;p=emacs.git Make memory-report not bug out with symbols with positions * lisp/emacs-lisp/memory-report.el (memory-report--object-size-1): Don't bug out when there are symbols with positions. --- diff --git a/lisp/emacs-lisp/memory-report.el b/lisp/emacs-lisp/memory-report.el index 6cb4cb02e0c..56b1ea6ed48 100644 --- a/lisp/emacs-lisp/memory-report.el +++ b/lisp/emacs-lisp/memory-report.el @@ -183,6 +183,10 @@ by counted more than once." (cl-defgeneric memory-report--object-size-1 (_counted _value) 0) +;; This shouldn't happen, but there's some leakage. +(cl-defmethod memory-report--object-size-1 (_ (_value symbol-with-pos)) + (memory-report--size 'symbol)) + (cl-defmethod memory-report--object-size-1 (_ (value symbol)) ;; Don't count global symbols -- makes sizes of lists of symbols too ;; heavy.