mirror of
https://github.com/python/cpython.git
synced 2026-05-08 03:21:16 +00:00
[3.14] GH-148726: Add heap_size to _gc_runtime_state (#149025)
This commit is contained in:
parent
4994367796
commit
4d0ae4cba9
6 changed files with 366 additions and 345 deletions
|
|
@ -1981,6 +1981,8 @@ PyObject_GC_Del(void *op)
|
|||
PyGC_Head *g = AS_GC(op);
|
||||
if (_PyObject_GC_IS_TRACKED(op)) {
|
||||
gc_list_remove(g);
|
||||
GCState *gcstate = get_gc_state();
|
||||
gcstate->heap_size--;
|
||||
#ifdef Py_DEBUG
|
||||
PyObject *exc = PyErr_GetRaisedException();
|
||||
if (PyErr_WarnExplicitFormat(PyExc_ResourceWarning, "gc", 0,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue