➜

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.

作者 vstinner
收信人 docs@python, eric.snow, ncoghlan, serhiy.storchaka, vstinner
日期 2017-11-24.16:05:00
SpamBayes Score -1.0
Marked as misclassified 是
Message-id <1511539500.4.0.213398074469.issue32124@psf.upfronthosting.co.za>
In-reply-to
内容
> 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().
历史
日期 用户 动作 参数
2017-11-24 16:05:00vstinner修改recipients: + vstinner, ncoghlan, docs@python, eric.snow, serhiy.storchaka
2017-11-24 16:05:00vstinner修改messageid: <1511539500.4.0.213398074469.issue32124@psf.upfronthosting.co.za>
2017-11-24 16:05:00vstinner链接issue32124 messages
2017-11-24 16:05:00vstinner创建