Issue #14785: Add sys._debugmallocstats() to help debug low-level memory allocation issues
diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index fd1d46c..4af5c49 100644
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -255,6 +255,15 @@
     return ret;
 }
 
+/* Print summary info about the state of the optimized allocator */
+void
+_PyDict_DebugMallocStats(FILE *out)
+{
+    _PyDebugAllocatorStats(out,
+                           "free PyDictObject", numfree, sizeof(PyDictObject));
+}
+
+
 void
 PyDict_Fini(void)
 {