Commit 621bb79b authored by Eli Zaretskii's avatar Eli Zaretskii

New debugging command 'malloc-info'

* src/alloc.c (Fmalloc_info) [GNU_LINUX]: New command.
(syms_of_alloc): Defsubr it.  (Bug#43389)
parent bce00552
Pipeline #7738 passed with stage
in 67 minutes and 20 seconds
......@@ -7194,6 +7194,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. */)
if (malloc_info (0, stderr))
error ("malloc_info failed: %s", emacs_strerror (errno));
return Qnil;
static bool
symbol_uses_obj (Lisp_Object symbol, Lisp_Object obj)
......@@ -7538,6 +7552,9 @@ N should be nonnegative. */);
defsubr (&Sgarbage_collect);
defsubr (&Smemory_info);
defsubr (&Smemory_use_counts);
#ifdef GNU_LINUX
defsubr (&Smalloc_info);
defsubr (&Ssuspicious_object);
Lisp_Object watcher;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment