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 xiang.zhang
Recipients serhiy.storchaka, vstinner, xiang.zhang
Date 2017-08-28.10:28:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1503916121.06.0.180130167862.issue31282@psf.upfronthosting.co.za>
In-reply-to
Content
>>> I fixed Python 3, no?

Yes. In Python3 they are replaced by PyMem_RawMalloc. But it's not only PyMem_Malloc, there are also PyErr_SetString, PyErr_NoMemory, even in Python3.

BTW, even in Python3, when memory allocators are in debug mode, it finally calls bumpserialno, which IIUC, is not thread safe. But of course it's another issue.

>>> For Python 2, in practice you can call PyMem_Malloc() without holding the GIL, it's just malloc() which is thread safe.

Hmm, I know it. But it's not stated in the doc they are thread safe, I am not sure assuming this is suitable. An example is https://github.com/psycopg/psycopg2/issues/110.
History
Date User Action Args
2017-08-28 10:28:41xiang.zhangsetrecipients: + xiang.zhang, vstinner, serhiy.storchaka
2017-08-28 10:28:41xiang.zhangsetmessageid: <1503916121.06.0.180130167862.issue31282@psf.upfronthosting.co.za>
2017-08-28 10:28:41xiang.zhanglinkissue31282 messages
2017-08-28 10:28:40xiang.zhangcreate