junyixie <xie.ju...@outlook.com> added the comment:
There is a problem: if we bound pymalloc state with a interpreter. malloc pointer in interpreterA and free pointer is usual. it's cause a problem. when we use PyObject_Free, 1. we look up address in pymalloc pool. 2. if not find, current code will call PyMem_RawFree(p) to free. it will cause crash.(address is pymalloc_alloc from another interpreter) I think it has two way to slove this problem: 1. free/alloc memory in one interpreter. Frequent switch interpreter affects performance 2. when free memory address, find this address in all interpreter pymalloc pool. and free it.(but it need add lock to pymalloc) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue43313> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com