8000 Revert "Trashcan consumes more C stack (experimental, targeting WASI … · python/cpython@f45bf67 · GitHub
[go: up one dir, main page]

Skip to content

Commit f45bf67

Browse files
committed
Revert "Trashcan consumes more C stack (experimental, targeting WASI Debug build)"
This doesn't work either. This reverts commit 391bd46.
1 parent c5d8c0a commit f45bf67

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Include/cpython/object.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -468,8 +468,8 @@ PyAPI_FUNC(void) _PyTrash_thread_destroy_chain(PyThreadState *tstate);
468468

469469
/* Python 3.10 private API, invoked by the Py_TRASHCAN_BEGIN(). */
470470

471-
/* To avoid raising recursion errors during dealloc, trigger trashcan before we reach
472-
* recursion limit. To avoid thrashing, we don't attempt to empty the trashcan until
471+
/* To avoid raising recursion errors during dealloc trigger trashcan before we reach
472+
* recursion limit. To avoid trashing, we don't attempt to empty the trashcan until
473473
* we have headroom above the trigger limit */
474474
#define Py_TRASHCAN_HEADROOM 50
475475

@@ -480,10 +480,10 @@ do { \
480480
_PyTrash_thread_deposit_object(tstate, (PyObject *)op); \
481481
break; \
482482
} \
483-
tstate->c_recursion_remaining -= 2;
483+
tstate->c_recursion_remaining--;
484484
/* The body of the deallocator is here. */
485485
#define Py_TRASHCAN_END \
486-
tstate->c_recursion_remaining += 2; \
486+
tstate->c_recursion_remaining++; \
487487
if (tstate->delete_later && tstate->c_recursion_remaining > (Py_TRASHCAN_HEADROOM*2)) { \
488488
_PyTrash_thread_destroy_chain(tstate); \
489489
} \

0 commit comments

Comments
 (0)
0