summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2022-01-27 02:35:51 (GMT)
committerGitHub <noreply@github.com>2022-01-27 02:35:51 (GMT)
commit6b491b9dc0b0fdfd1f07ea4e2151236186d8e7e6 (patch)
tree9922e2b27ecbf982d3d847da691523d32997c3c3 /Objects
parentaf32b3ef1fbad3c2242627a14398320960a0cb45 (diff)
downloadcpython-6b491b9dc0b0fdfd1f07ea4e2151236186d8e7e6.zip
cpython-6b491b9dc0b0fdfd1f07ea4e2151236186d8e7e6.tar.gz
cpython-6b491b9dc0b0fdfd1f07ea4e2151236186d8e7e6.tar.bz2
bpo-40170: Remove _Py_GetAllocatedBlocks() function (GH-30940)
Move _Py_GetAllocatedBlocks() and _PyObject_DebugMallocStats() private functions to the internal C API.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/obmalloc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/Objects/obmalloc.c b/Objects/obmalloc.c
index 4e17bf4..ea0faff 100644
--- a/Objects/obmalloc.c
+++ b/Objects/obmalloc.c
@@ -8,6 +8,9 @@
/* Defined in tracemalloc.c */
extern void _PyMem_DumpTraceback(int fd, const void *ptr);
+// Forward declaration
+int _PyObject_DebugMallocStats(FILE *out);
+
/* Python's malloc wrappers (see pymem.h) */
@@ -1569,8 +1572,9 @@ new_arena(void)
const char *opt = Py_GETENV("PYTHONMALLOCSTATS");
debug_stats = (opt != NULL && *opt != '\0');
}
- if (debug_stats)
+ if (debug_stats) {
_PyObject_DebugMallocStats(stderr);
+ }
if (unused_arena_objects == NULL) {
uint i;