10000 GH-130396: Increase trashcan overhead (GH-130552) · python/cpython@263d56e · GitHub
[go: up one dir, main page]

Skip to content

Commit 263d56e

Browse files
authored
GH-130396: Increase trashcan overhead (GH-130552)
Double trashcan overhead
1 parent 59d3ad0 commit 263d56e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Include/cpython/object.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -494,13 +494,13 @@ PyAPI_FUNC(int) _Py_ReachedRecursionLimitWithMargin(PyThreadState *tstate, int m
494494
#define Py_TRASHCAN_BEGIN(op, dealloc) \
495495
do { \
496496
PyThreadState *tstate = PyThreadState_Get(); \
497-
if (_Py_ReachedRecursionLimitWithMargin(tstate, 1) && Py_TYPE(op)->tp_dealloc == (destructor)dealloc) { \
497+
if (_Py_ReachedRecursionLimitWithMargin(tstate, 2) && Py_TYPE(op)->tp_dealloc == (destructor)dealloc) { \
498498
_PyTrash_thread_deposit_object(tstate, (PyObject *)op); \
499499
break; \
500500
}
501501
/* The body of the deallocator is here. */
502502
#define Py_TRASHCAN_END \
503-
if (tstate->delete_later && !_Py_ReachedRecursionLimitWithMargin(tstate, 2)) { \
503+
if (tstate->delete_later && !_Py_ReachedRecursionLimitWithMargin(tstate, 4)) { \
504504
_PyTrash_thread_destroy_chain(tstate); \
505505
} \
506506
} while (0);

0 commit comments

Comments
 (0)
0