summaryrefslogtreecommitdiff
path: root/Objects/setobject.c
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2012-06-22 14:55:41 -0400
committerDavid Malcolm <dmalcolm@redhat.com>2012-06-22 14:55:41 -0400
commitc66679874d42ebaddde9958928171a8bb318b116 (patch)
tree1b3fa840264d3c74665678ee7e8735fafe44125d /Objects/setobject.c
parentec1b06d577d16cf06f2789b8e556781a276d54b1 (diff)
downloadcpython-c66679874d42ebaddde9958928171a8bb318b116.tar.gz
Issue #14785: Add sys._debugmallocstats() to help debug low-level memory allocation issues
Diffstat (limited to 'Objects/setobject.c')
-rw-r--r--Objects/setobject.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/Objects/setobject.c b/Objects/setobject.c
index b903fbee80..3e91572d32 100644
--- a/Objects/setobject.c
+++ b/Objects/setobject.c
@@ -1133,6 +1133,16 @@ PySet_Fini(void)
Py_CLEAR(emptyfrozenset);
}
+/* Print summary info about the state of the optimized allocator */
+void
+_PySet_DebugMallocStats(FILE *out)
+{
+ _PyDebugAllocatorStats(out,
+ "free PySetObject",
+ numfree, sizeof(PySetObject));
+}
+
+
static PyObject *
set_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
{