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/classobject.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Objects/classobject.c') diff --git a/Objects/classobject.c b/Objects/classobject.c index 09b95bf29f..0416a6a733 100644 --- a/Objects/classobject.c +++ b/Objects/classobject.c @@ -400,6 +400,15 @@ PyMethod_Fini(void) (void)PyMethod_ClearFreeList(); } +/* Print summary info about the state of the optimized allocator */ +void +_PyMethod_DebugMallocStats(FILE *out) +{ + _PyDebugAllocatorStats(out, + "free PyMethodObject", + numfree, sizeof(PyMethodObject)); +} + /* ------------------------------------------------------------------------ * instance method */ -- cgit v1.2.1