diff Python/pythonrun.c @ 23020:e2848618bd19 legacy-trunk

_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.
author Tim Peters <tim.peters@gmail.com>
date Sat, 13 Apr 2002 08:29:14 +0000
parents d8bc68cb17e0
children 4f335ca3f11c
line wrap: on
line diff
--- a/Python/pythonrun.c	Sat Apr 13 05:21:47 2002 +0000
+++ b/Python/pythonrun.c	Sat Apr 13 08:29:14 2002 +0000
@@ -276,6 +276,11 @@
 
 	PyGrammar_RemoveAccelerators(&_PyParser_Grammar);
 
+#ifdef PYMALLOC_DEBUG
+	if (Py_GETENV("PYTHONMALLOCSTATS"))
+		_PyObject_DebugMallocStats();
+#endif
+
 	call_ll_exitfuncs();
 
 #ifdef Py_TRACE_REFS