summaryrefslogtreecommitdiff
path: root/src/alloc.c
diff options
context:
space:
mode:
authorAndrea Corallo <akrl@sdf.org>2020-11-14 22:07:54 +0100
committerAndrea Corallo <akrl@sdf.org>2020-11-14 22:07:54 +0100
commit2a8bf2222dd5d786375c131aa13dd1ea6f0cf104 (patch)
tree4f69d049302a8144783ff697f6a73d7e3e585539 /src/alloc.c
parentf702426780475309bdd33ef896d28dd33484246b (diff)
parentad29bc74ca9d4e1768698d4002b49c234624e359 (diff)
downloademacs-2a8bf2222dd5d786375c131aa13dd1ea6f0cf104.tar.gz
Merge remote-tracking branch 'savannah/master' into dev
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/alloc.c b/src/alloc.c
index fbfa814bcd8..ff6681cc760 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -7225,6 +7225,20 @@ Frames, windows, buffers, and subprocesses count as vectors
make_int (strings_consed));
}
+#ifdef GNU_LINUX
+DEFUN ("malloc-info", Fmalloc_info, Smalloc_info, 0, 0, "",
+ doc: /* Report malloc information to stderr.
+This function outputs to stderr an XML-formatted
+description of the current state of the memory-allocation
+arenas. */)
+ (void)
+{
+ if (malloc_info (0, stderr))
+ error ("malloc_info failed: %s", emacs_strerror (errno));
+ return Qnil;
+}
+#endif
+
static bool
symbol_uses_obj (Lisp_Object symbol, Lisp_Object obj)
{
@@ -7569,6 +7583,9 @@ N should be nonnegative. */);
defsubr (&Sgarbage_collect);
defsubr (&Smemory_info);
defsubr (&Smemory_use_counts);
+#ifdef GNU_LINUX
+ defsubr (&Smalloc_info);
+#endif
defsubr (&Ssuspicious_object);
Lisp_Object watcher;