Function: profiler-memory-log

profiler-memory-log is a function defined in profiler.c.

Signature

(profiler-memory-log)

Documentation

Return the current memory profiler log.

The log is a hash-table mapping backtraces to counters which represent the amount of memory allocated at those points. Every backtrace is a vector of functions, where the last few elements may be nil. Before returning, a new log is allocated for future samples.

Source Code

// Defined in /usr/src/emacs/src/profiler.c
{
  Lisp_Object result = memory_log;
  /* Here we're making the log visible to Elisp , so it's not safe any
     more for our use afterwards since we can't rely on its special
     pre-allocated keys anymore.  So we have to allocate a new one.  */
  memory_log = profiler_memory_running ? make_log () : Qnil;
  return result;
}