mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
bpo-40170: Remove _Py_GetAllocatedBlocks() function (GH-30940)
Move _Py_GetAllocatedBlocks() and _PyObject_DebugMallocStats() private functions to the internal C API.
This commit is contained in:
parent
af32b3ef1f
commit
6b491b9dc0
4 changed files with 16 additions and 9 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue