Re: [Python-Dev] Allow calling PyMem_Malloc() without the GIL held in Python 3.4

2013-06-14 Thread Victor Stinner
I commited the new API (little bit different than my last patch on issue #3329): http://hg.python.org/cpython/rev/6661a8154eb3 The documentation will be available in a few minutes at: http://docs.python.org/3/c-api/memory.html 2013/6/14 Kristján Valur Jónsson : >> Removing the GIL restriction wou

Re: [Python-Dev] Allow calling PyMem_Malloc() without the GIL held in Python 3.4

2013-06-14 Thread Kristján Valur Jónsson
> -Original Message- > I would like to remove the "GIL must be held" restriction from > PyMem_Malloc(). In my opinion, the restriction was motived by a bug in > Python, bug fixed by the issue #3329. Let me explain why. > ... > > Removing the GIL restriction would help to replace direct

[Python-Dev] Allow calling PyMem_Malloc() without the GIL held in Python 3.4

2013-06-13 Thread Victor Stinner
Hi, I would like to remove the "GIL must be held" restriction from PyMem_Malloc(). In my opinion, the restriction was motived by a bug in Python, bug fixed by the issue #3329. Let me explain why. The PyMem_Malloc() function is a thin wrapper to malloc(). It returns NULL if the size is lager than