diff options
author | Fedora Python maintainers <python-devel@lists.fedoraproject.org> | 2020-07-15 13:37:52 (GMT) |
---|---|---|
committer | Petr Viktorin <pviktori@redhat.com> | 2020-09-29 13:59:05 (GMT) |
commit | b4f5b3de3f77729901d4ae35f4ea001e7ad73199 (patch) | |
tree | 1d9e5e96d156402c5168900e6e2572bdaa22c806 /Objects/methodobject.c | |
parent | a152631688d0889ab1f857e3c4cdfa7357c7f28c (diff) | |
download | cpython-b4f5b3de3f77729901d4ae35f4ea001e7ad73199.zip cpython-b4f5b3de3f77729901d4ae35f4ea001e7ad73199.tar.gz cpython-b4f5b3de3f77729901d4ae35f4ea001e7ad73199.tar.bz2 |
00147-add-debug-malloc-stats.patch
00147 #
Add a sys._debugmallocstats() function
Based on patch 202 from RHEL 5's python.spec, with updates from rhbz#737198
Sent upstream as http://bugs.python.org/issue14785
Diffstat (limited to 'Objects/methodobject.c')
-rw-r--r-- | Objects/methodobject.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Objects/methodobject.c b/Objects/methodobject.c index c1a99ab..ea5df77 100644 --- a/Objects/methodobject.c +++ b/Objects/methodobject.c @@ -412,6 +412,15 @@ PyCFunction_Fini(void) (void)PyCFunction_ClearFreeList(); } +/* Print summary info about the state of the optimized allocator */ +void +_PyCFunction_DebugMallocStats(FILE *out) +{ + _PyDebugAllocatorStats(out, + "free PyCFunction", + numfree, sizeof(PyCFunction)); +} + /* PyCFunction_New() is now just a macro that calls PyCFunction_NewEx(), but it's part of the API so we need to keep a function around that existing C extensions can call. |