summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/memory-report.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2022-05-26 13:04:50 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2022-05-26 13:04:50 +0200
commit06c79dcfcbc634325b688385be95cd5ed049e208 (patch)
treeb881636cbcf30fe04bab4d1c86f78b32ce473d2a /lisp/emacs-lisp/memory-report.el
parent47e0b866110b25343daf025de85d5f22ed829cc1 (diff)
downloademacs-06c79dcfcbc634325b688385be95cd5ed049e208.tar.gz
emacs-06c79dcfcbc634325b688385be95cd5ed049e208.tar.bz2
emacs-06c79dcfcbc634325b688385be95cd5ed049e208.zip
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.
Diffstat (limited to 'lisp/emacs-lisp/memory-report.el')
-rw-r--r--lisp/emacs-lisp/memory-report.el4
1 files changed, 4 insertions, 0 deletions
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.