This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients docs@python, eric.snow, ncoghlan, serhiy.storchaka, vstinner
Date 2017-11-24.16:05:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1511539500.4.0.213398074469.issue32124@psf.upfronthosting.co.za>
In-reply-to
Content
> Are you sure about PyMem_Malloc() and PyObject_Malloc()?

Technically, the pymalloc memory allocator is initialized statically by the compiler, from the first instruction of the process.

But maybe we should not suggest users to call them, especially because the allocator can be modified by the PYTHONMALLOC environment variable.

> What functions require them?

No function to initalize Python require PyMem or PyObject allocators. Only PyMem_Raw allocator is needed.

Py_EncodeLocale() uses it, but this function also uses Python objects (str, bytes), and so Py_EncodeLocale() must no be called before Py_Initialize().
History
Date User Action Args
2017-11-24 16:05:00vstinnersetrecipients: + vstinner, ncoghlan, docs@python, eric.snow, serhiy.storchaka
2017-11-24 16:05:00vstinnersetmessageid: <1511539500.4.0.213398074469.issue32124@psf.upfronthosting.co.za>
2017-11-24 16:05:00vstinnerlinkissue32124 messages
2017-11-24 16:05:00vstinnercreate