There was an error while loading. Please reload this page.
1 parent 5b55760 commit 8cb139fCopy full SHA for 8cb139f
1 file changed
Python/gc_free_threading.c
@@ -1836,32 +1836,6 @@ custom_visitor_wrapper(const mi_heap_t *heap, const mi_heap_area_t *area,
1836
return true;
1837
}
1838
1839
-// gh-117783: Immortalize objects that use deferred reference counting to
1840
-// temporarily work around scaling bottlenecks.
1841
-static bool
1842
-immortalize_visitor(const mi_heap_t *heap, const mi_heap_area_t *area,
1843
- void *block, size_t block_size, void *args)
1844
-{
1845
- PyObject *op = op_from_block(block, args, false);
1846
- if (op != NULL && _PyObject_HasDeferredRefcount(op)) {
1847
- _Py_SetImmortal(op);
1848
- op->ob_gc_bits &= ~_PyGC_BITS_DEFERRED;
1849
- }
1850
- return true;
1851
-}
1852
-
1853
-void
1854
-_PyGC_ImmortalizeDeferredObjects(PyInterpreterState *interp)
1855
1856
- struct visitor_args args;
1857
- _PyEval_StopTheWorld(interp);
1858
- if (interp->gc.immortalize == 0) {
1859
- gc_visit_heaps(interp, &immortalize_visitor, &args);
1860
- interp->gc.immortalize = 1;
1861
1862
- _PyEval_StartTheWorld(interp);
1863
1864
1865
void
1866
PyUnstable_GC_VisitObjects(gcvisitobjects_t callback, void *arg)
1867
{
0 commit comments