There was an error while loading. Please reload this page.
1 parent 6438bf5 commit 6deccd5Copy full SHA for 6deccd5
1 file changed
Modules/main.c
@@ -380,14 +380,6 @@ read_command_line(int argc, wchar_t **argv, _Py_CommandLineDetails *cmdline)
380
wchar_t *command = NULL;
381
wchar_t *module = NULL;
382
int c;
383
- char *opt;
384
-
385
- opt = Py_GETENV("PYTHONMALLOC");
386
- if (_PyMem_SetupAllocators(opt) < 0) {
387
- fprintf(stderr,
388
- "Error in PYTHONMALLOC: unknown allocator \"%s\"!\n", opt);
389
- exit(1);
390
- }
391
392
_PyOS_ResetGetOpt();
393
@@ -603,6 +595,13 @@ Py_Main(int argc, wchar_t **argv)
603
595
}
604
596
605
597
598
+ char *pymalloc = Py_GETENV("PYTHONMALLOC");
599
+ if (_PyMem_SetupAllocators(pymalloc) < 0) {
600
+ fprintf(stderr,
601
+ "Error in PYTHONMALLOC: unknown allocator \"%s\"!\n", pymalloc);
602
+ exit(1);
+ }
+
606
/* Initialize the core language runtime */
607
Py_IgnoreEnvironmentFlag = core_config.ignore_environment;
608
core_config._disable_importlib = 0;
0 commit comments