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 vstinner
Recipients njs, vstinner
Date 2016-03-10.14:34:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Patch without test.

I chose to require the GIL to be held for efficiency. IMHO the common case is more than the GIL is held.

Example to call the function if the GIL is not held:

    int res;
    PyGILState_STATE gil_state;
    gil_state = PyGILState_Ensure();
    res = _PyTraceMalloc_Track(ptr, size);
    return res;

See also my numpy pull request on PyMem_Malloc() called without the GIL being held:
Date User Action Args
2016-03-10 14:34:20vstinnersetrecipients: + vstinner, njs
2016-03-10 14:34:20vstinnersetmessageid: <>
2016-03-10 14:34:20vstinnerlinkissue26530 messages
2016-03-10 14:34:20vstinnercreate