File tree Expand file tree Collapse file tree 4 files changed +4
-4
lines changed Expand file tree Collapse file tree 4 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -658,6 +658,7 @@ struct _obmalloc_usage {
658
658
659
659
660
660
struct _obmalloc_state {
661
+ int dump_debug_stats ;
661
662
struct _obmalloc_pools pools ;
662
663
struct _obmalloc_mgmt mgmt ;
663
664
struct _obmalloc_usage usage ;
Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ extern "C" {
56
56
57
57
#define _obmalloc_state_INIT (obmalloc ) \
58
58
{ \
59
+ .dump_debug_stats = -1, \
59
60
.pools = { \
60
61
.used = _obmalloc_pools_INIT(obmalloc.pools), \
61
62
}, \
Original file line number Diff line number Diff line change @@ -908,11 +908,12 @@ new_arena(void)
908
908
struct arena_object * arenaobj ;
909
909
uint excess ; /* number of bytes above pool alignment */
910
910
void * address ;
911
- static int debug_stats = -1 ;
912
911
912
+ int debug_stats = _PyRuntime .obmalloc .dump_debug_stats ;
913
913
if (debug_stats == -1 ) {
914
914
const char * opt = Py_GETENV ("PYTHONMALLOCSTATS" );
915
915
debug_stats = (opt != NULL && * opt != '\0' );
916
+ _PyRuntime .obmalloc .dump_debug_stats = debug_stats ;
916
917
}
917
918
if (debug_stats ) {
918
919
_PyObject_DebugMallocStats (stderr );
Original file line number Diff line number Diff line change @@ -305,9 +305,6 @@ Objects/sliceobject.c - _Py_EllipsisObject -
305
305
# #-----------------------
306
306
# # effectively-const but initialized lazily
307
307
308
- # # idempotent
309
- Objects/obmalloc.c new_arena debug_stats -
310
-
311
308
# # others
312
309
Python/perf_trampoline.c - perf_map_file -
313
310
You can’t perform that action at this time.
0 commit comments