diff options
author | Mark Shannon <mark@hotpy.org> | 2025-02-26 08:54:24 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-26 08:54:24 (GMT) |
commit | 263d56e1e23c711e3abafcae6707cbeb66d15e93 (patch) | |
tree | d8d4601ec0dda23d7a180231b01503717f835b16 | |
parent | 59d3ad0c62570d33101e60f7592acccce571a6f6 (diff) | |
download | cpython-263d56e1e23c711e3abafcae6707cbeb66d15e93.zip cpython-263d56e1e23c711e3abafcae6707cbeb66d15e93.tar.gz cpython-263d56e1e23c711e3abafcae6707cbeb66d15e93.tar.bz2 |
GH-130396: Increase trashcan overhead (GH-130552)
Double trashcan overhead
-rw-r--r-- | Include/cpython/object.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Include/cpython/object.h b/Include/cpython/object.h index f466091..70cf0b5 100644 --- a/Include/cpython/object.h +++ b/Include/cpython/object.h @@ -494,13 +494,13 @@ PyAPI_FUNC(int) _Py_ReachedRecursionLimitWithMargin(PyThreadState *tstate, int m #define Py_TRASHCAN_BEGIN(op, dealloc) \ do { \ PyThreadState *tstate = PyThreadState_Get(); \ - if (_Py_ReachedRecursionLimitWithMargin(tstate, 1) && Py_TYPE(op)->tp_dealloc == (destructor)dealloc) { \ + if (_Py_ReachedRecursionLimitWithMargin(tstate, 2) && Py_TYPE(op)->tp_dealloc == (destructor)dealloc) { \ _PyTrash_thread_deposit_object(tstate, (PyObject *)op); \ break; \ } /* The body of the deallocator is here. */ #define Py_TRASHCAN_END \ - if (tstate->delete_later && !_Py_ReachedRecursionLimitWithMargin(tstate, 2)) { \ + if (tstate->delete_later && !_Py_ReachedRecursionLimitWithMargin(tstate, 4)) { \ _PyTrash_thread_destroy_chain(tstate); \ } \ } while (0); |