From a9df651eb4c18a07ec309df190419613e95cba7b Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 5 Mar 2019 23:31:54 +0100 Subject: bpo-36142: Add _PyMem_GetDebugAllocatorsName() (GH-12185) The development mode now uses the effective name of the debug memory allocator ("pymalloc_debug" or "malloc_debug"). So the name doesn't change after setting the memory allocator. --- Python/preconfig.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Python') diff --git a/Python/preconfig.c b/Python/preconfig.c index 98e0edead1..46e1809fc5 100644 --- a/Python/preconfig.c +++ b/Python/preconfig.c @@ -453,7 +453,8 @@ preconfig_read(_PyPreConfig *config, const _PyPreCmdline *cmdline) /* allocator */ if (config->dev_mode && config->allocator == NULL) { - config->allocator = _PyMem_RawStrdup("debug"); + const char *allocator = _PyMem_GetDebugAllocatorsName(); + config->allocator = _PyMem_RawStrdup(allocator); if (config->allocator == NULL) { return _Py_INIT_NO_MEMORY(); } -- cgit v1.2.1