Le ven. 21 juin 2019 à 23:19, Thomas Wouters <tho...@python.org> a écrit : > Is this really feasible in a world where the allocators can be selected (and > the default changed) at runtime?
The memory allocation must not be changed after the Python pre-initialization. What's done after pre-initialization is more to put "hook" which executes code before/after an allocation, but don't replace the allocator. It simply doesn't work to switch from pymalloc to malloc "at runtime". Calling PyMem_Free(ptr) would call free(ptr). If the memory block was allocated by pymalloc, free(ptr) does simply crash. Victor _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/C5AI3SL77AV6QLRNTJ4PZH7MCYR2ZQAC/