diff Objects/setobject.c @ 77577:d63a80abfbec

Issue #14785: Add sys._debugmallocstats() to help debug low-level memory allocation issues
author David Malcolm <dmalcolm@redhat.com>
date Fri, 22 Jun 2012 14:55:41 -0400
parents fb907ee4fdfa
children cfa511af42b2
line wrap: on
line diff
--- a/Objects/setobject.c	Fri Jun 22 18:40:02 2012 +0000
+++ b/Objects/setobject.c	Fri Jun 22 14:55:41 2012 -0400
@@ -1133,6 +1133,16 @@
     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)
 {