Also count symbol plists in memory-report
* lisp/emacs-lisp/memory-report.el (memory-report--symbol-plist): New function. (memory-report): Use it.
This commit is contained in:
parent
3c0c47b3a7
commit
dc771b6c40
1 changed files with 12 additions and 0 deletions
|
@ -48,6 +48,7 @@ by counted more than once."
|
|||
(message "Gathering data...")
|
||||
(let ((reports (append (memory-report--garbage-collect)
|
||||
(memory-report--image-cache)
|
||||
(memory-report--symbol-plist)
|
||||
(memory-report--buffers)
|
||||
(memory-report--largest-variables)))
|
||||
(inhibit-read-only t)
|
||||
|
@ -159,6 +160,17 @@ by counted more than once."
|
|||
"\n"))
|
||||
(buffer-string)))))
|
||||
|
||||
(defun memory-report--symbol-plist ()
|
||||
(let ((counted (make-hash-table :test #'eq))
|
||||
(total 0))
|
||||
(mapatoms
|
||||
(lambda (symbol)
|
||||
(cl-incf total (memory-report--object-size
|
||||
counted (symbol-plist symbol))))
|
||||
obarray)
|
||||
(list
|
||||
(cons "Memory Used By Symbol Plists" total))))
|
||||
|
||||
(defun memory-report--object-size (counted value)
|
||||
(if (gethash value counted)
|
||||
0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue