diff options
author | Eric Snow <ericsnowcurrently@gmail.com> | 2023-03-21 17:46:09 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-21 17:46:09 (GMT) |
commit | 743687434c5baf01c266320b34c7a828726702a6 (patch) | |
tree | 6d26f4fcb5aaa2b606b433aecad939e9f36734f9 /Objects/bytesobject.c | |
parent | 4bb1dd3c5c14338c9d9cea5988431c858b3b76e0 (diff) | |
download | cpython-743687434c5baf01c266320b34c7a828726702a6.zip cpython-743687434c5baf01c266320b34c7a828726702a6.tar.gz cpython-743687434c5baf01c266320b34c7a828726702a6.tar.bz2 |
gh-102304: Move the Total Refcount to PyInterpreterState (gh-102545)
Moving it valuable with a per-interpreter GIL. However, it is also useful without one, since it allows us to identify refleaks within a single interpreter or where references are escaping an interpreter. This becomes more important as we move the obmalloc state to PyInterpreterState.
https://github.com/python/cpython/issues/102304
Diffstat (limited to 'Objects/bytesobject.c')
-rw-r--r-- | Objects/bytesobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c index 687a654..2d8dab6 100644 --- a/Objects/bytesobject.c +++ b/Objects/bytesobject.c @@ -3067,7 +3067,7 @@ _PyBytes_Resize(PyObject **pv, Py_ssize_t newsize) PyObject_Realloc(v, PyBytesObject_SIZE + newsize); if (*pv == NULL) { #ifdef Py_REF_DEBUG - _Py_DecRefTotal(); + _Py_DecRefTotal(_PyInterpreterState_GET()); #endif PyObject_Free(v); PyErr_NoMemory(); |