From 49526f48fc73d3ccdf09d466ed2d39a30e4df9b9 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Fri, 22 Jun 2012 14:55:41 -0400 Subject: Issue #14785: Add sys._debugmallocstats() to help debug low-level memory allocation issues --- Objects/dictobject.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Objects/dictobject.c') diff --git a/Objects/dictobject.c b/Objects/dictobject.c index fd1d46c6c3..4af5c49e95 100644 --- a/Objects/dictobject.c +++ b/Objects/dictobject.c @@ -255,6 +255,15 @@ PyDict_ClearFreeList(void) 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) { -- cgit v1.2.1