summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2002-04-13 08:29:14 (GMT)
committerTim Peters <tim.peters@gmail.com>2002-04-13 08:29:14 (GMT)
commit0e871188e8cd9a4e41be7c734e250bfce2d92d56 (patch)
treec7ef141919fceb1f741a27825ceafb093c546021 /Python
parentb7ba7433126bff12dd638f11f831fa7bfd0bbf4a (diff)
downloadcpython-0e871188e8cd9a4e41be7c734e250bfce2d92d56.zip
cpython-0e871188e8cd9a4e41be7c734e250bfce2d92d56.tar.gz
cpython-0e871188e8cd9a4e41be7c734e250bfce2d92d56.tar.bz2
_PyObject_DebugDumpStats: renamed to _PyObject_DebugMallocStats.
Added code to call this when PYMALLOC_DEBUG is enabled, and envar PYTHONMALLOCSTATS is set, whenever a new arena is obtained and once late in the Python shutdown process.
Diffstat (limited to 'Python')
-rw-r--r--Python/pythonrun.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index f0727d3..0ca1f42 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -276,6 +276,11 @@ Py_Finalize(void)
PyGrammar_RemoveAccelerators(&_PyParser_Grammar);
+#ifdef PYMALLOC_DEBUG
+ if (Py_GETENV("PYTHONMALLOCSTATS"))
+ _PyObject_DebugMallocStats();
+#endif
+
call_ll_exitfuncs();
#ifdef Py_TRACE_REFS