summaryrefslogtreecommitdiff
path: root/doc/lispref/internals.texi
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2020-12-11 14:49:53 +0100
committerLars Ingebrigtsen <larsi@gnus.org>2020-12-11 14:49:53 +0100
commit004d7e97e2c54c1089a776055ffd173d132fe5ae (patch)
treed640749d7ae1c7f764ca8206fa76036e7dc793bc /doc/lispref/internals.texi
parentaa7e5ce651b1872180e8da94ac80fbc25e33eec0 (diff)
downloademacs-004d7e97e2c54c1089a776055ffd173d132fe5ae.tar.gz
emacs-004d7e97e2c54c1089a776055ffd173d132fe5ae.tar.bz2
emacs-004d7e97e2c54c1089a776055ffd173d132fe5ae.zip
Add a new command `memory-report'
* doc/lispref/internals.texi (Garbage Collection): Document it. * lisp/emacs-lisp/memory-report.el: New package.
Diffstat (limited to 'doc/lispref/internals.texi')
-rw-r--r--doc/lispref/internals.texi13
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/lispref/internals.texi b/doc/lispref/internals.texi
index bb25983aa4b..fb24544c917 100644
--- a/doc/lispref/internals.texi
+++ b/doc/lispref/internals.texi
@@ -615,6 +615,19 @@ during garbage collection so far in this Emacs session, as a
floating-point number.
@end defvar
+@defun memory-report
+It can sometimes be useful to see where Emacs is using memory (in
+various variables, buffers, and caches). This command will open a new
+buffer (called @samp{"*Memory Report*"}) that will give an overview,
+in addition to listing the ``largest'' buffers and variables.
+
+All the data here is approximate, because there's really no consistent
+way to compute the size of a variable. For instance, two variables
+may share parts of a data structure, and this will be counted twice,
+but this command may still give a useful high-level overview of which
+parts of Emacs is using memory.
+@end defun
+
@node Stack-allocated Objects
@section Stack-allocated Objects