summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-05-12 23:36:47 (GMT)
committerGitHub <noreply@github.com>2020-05-12 23:36:47 (GMT)
commit9e2ca1742076169089b818d0883688a2ddd9964a (patch)
tree048990c84f28de9f2f8b5aa0e53b861bfa1cdf83 /Include
parent3d54211e6eddc2f2586b9a20543754947c7ad325 (diff)
downloadcpython-9e2ca1742076169089b818d0883688a2ddd9964a.zip
cpython-9e2ca1742076169089b818d0883688a2ddd9964a.tar.gz
cpython-9e2ca1742076169089b818d0883688a2ddd9964a.tar.bz2
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.
Diffstat (limited to 'Include')
-rw-r--r--Include/internal/pycore_pymem.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/Include/internal/pycore_pymem.h b/Include/internal/pycore_pymem.h
index 18203e3..3d925e2 100644
--- a/Include/internal/pycore_pymem.h
+++ b/Include/internal/pycore_pymem.h
@@ -88,17 +88,12 @@ struct _PyTraceMalloc_Config {
/* limit of the number of frames in a traceback, 1 by default.
Variable protected by the GIL. */
int max_nframe;
-
- /* use domain in trace key?
- Variable protected by the GIL. */
- int use_domain;
};
#define _PyTraceMalloc_Config_INIT \
{.initialized = TRACEMALLOC_NOT_INITIALIZED, \
.tracing = 0, \
- .max_nframe = 1, \
- .use_domain = 0}
+ .max_nframe = 1}
PyAPI_DATA(struct _PyTraceMalloc_Config) _Py_tracemalloc_config;