Browse Source
bpo-32030: Fix usage of memory allocators (#4953)
bpo-32030: Fix usage of memory allocators (#4953)
* _Py_InitializeCore() doesn't call _PyMem_SetupAllocators() anymore if the PYTHONMALLOC environment variable is not set. * pymain_cmdline() now sets the allocator to the default, instead of setting the allocator in subfunctions. * Py_SetStandardStreamEncoding() now calls _PyMem_SetDefaultAllocator() to get a known allocator, to be able to release the memory with the same allocator.pull/4841/merge
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 50 additions and 12 deletions
-
2Misc/NEWS.d/next/C API/2017-12-20-23-22-32.bpo-32030.d1dcwh.rst
-
26Modules/main.c
-
34Python/pylifecycle.c
@ -0,0 +1,2 @@ |
|||
Py_Initialize() doesn't reset the memory allocators to default if the |
|||
``PYTHONMALLOC`` environment variable is not set. |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue