Skip to content

Commit 9e2ca17

Browse files
authored
bpo-40609: Rewrite how _tracemalloc handles domains (GH-20059)
Rewrite how the _tracemalloc module stores traces of other domains. Rather than storing the domain inside the key, it now uses a new hash table with the domain as the key, and the data is a per-domain traces hash table. * Add tracemalloc_domain hash table. * Remove _Py_tracemalloc_config.use_domain. * Remove pointer_t and related functions.
1 parent 3d54211 commit 9e2ca17

File tree

2 files changed

+174
-160
lines changed

2 files changed

+174
-160
lines changed

Include/internal/pycore_pymem.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,17 +88,12 @@ struct _PyTraceMalloc_Config {
8888
/* limit of the number of frames in a traceback, 1 by default.
8989
Variable protected by the GIL. */
9090
int max_nframe;
91-
92-
/* use domain in trace key?
93-
Variable protected by the GIL. */
94-
int use_domain;
9591
};
9692

9793
#define _PyTraceMalloc_Config_INIT \
9894
{.initialized = TRACEMALLOC_NOT_INITIALIZED, \
9995
.tracing = 0, \
100-
.max_nframe = 1, \
101-
.use_domain = 0}
96+
.max_nframe = 1}
10297

10398
PyAPI_DATA(struct _PyTraceMalloc_Config) _Py_tracemalloc_config;
10499

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy