summaryrefslogtreecommitdiffstats
path: root/Objects/frameobject.c
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2012-06-22 18:55:41 (GMT)
committerDavid Malcolm <dmalcolm@redhat.com>2012-06-22 18:55:41 (GMT)
commit49526f48fc73d3ccdf09d466ed2d39a30e4df9b9 (patch)
tree51ac80c4d09ca4a537518555710423675a6ac731 /Objects/frameobject.c
parent69cf913ba110de2eb773c030b1dd606456ac5831 (diff)
downloadcpython-49526f48fc73d3ccdf09d466ed2d39a30e4df9b9.zip
cpython-49526f48fc73d3ccdf09d466ed2d39a30e4df9b9.tar.gz
cpython-49526f48fc73d3ccdf09d466ed2d39a30e4df9b9.tar.bz2
Issue #14785: Add sys._debugmallocstats() to help debug low-level memory allocation issues
Diffstat (limited to 'Objects/frameobject.c')
-rw-r--r--Objects/frameobject.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/Objects/frameobject.c b/Objects/frameobject.c
index 929385f..808e595 100644
--- a/Objects/frameobject.c
+++ b/Objects/frameobject.c
@@ -955,3 +955,13 @@ PyFrame_Fini(void)
Py_XDECREF(builtin_object);
builtin_object = NULL;
}
+
+/* Print summary info about the state of the optimized allocator */
+void
+_PyFrame_DebugMallocStats(FILE *out)
+{
+ _PyDebugAllocatorStats(out,
+ "free PyFrameObject",
+ numfree, sizeof(PyFrameObject));
+}
+