]> git.eshelyaron.com Git - emacs.git/commitdiff
Make memory-report not bug out with symbols with positions
authorLars Ingebrigtsen <larsi@gnus.org>
Thu, 26 May 2022 11:04:50 +0000 (13:04 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Thu, 26 May 2022 11:04:50 +0000 (13:04 +0200)
* lisp/emacs-lisp/memory-report.el (memory-report--object-size-1):
Don't bug out when there are symbols with positions.

lisp/emacs-lisp/memory-report.el

index 6cb4cb02e0c4c18cdd47bf4fb734353c8f963fc4..56b1ea6ed48e4e101f8c22e7a68150875461d428 100644 (file)
@@ -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.