Issue #14785: Add sys._debugmallocstats() to help debug low-level memory allocation issues

This commit is contained in:
David Malcolm 2012-06-22 14:55:41 -04:00
parent 69cf913ba1
commit 49526f48fc
24 changed files with 217 additions and 35 deletions

View file

@ -955,3 +955,13 @@ PyFrame_Fini(void)
Py_XDECREF(builtin_object);
builtin_object = NULL;
}
/* Print summary info about the state of the optimized allocator */
void
_PyFrame_DebugMallocStats(FILE *out)
{
_PyDebugAllocatorStats(out,
"free PyFrameObject",
numfree, sizeof(PyFrameObject));
}