STINNER Victor <victor.stin...@gmail.com> added the comment: > 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(). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32124> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com