mirror of https://github.com/python/cpython
The tracking statistics were actually too pessimistic
This commit is contained in:
parent
f8387af262
commit
1fba62427c
|
@ -498,6 +498,7 @@ _PyDict_MaybeUntrack(PyObject *op)
|
|||
_PyObject_GC_MAY_BE_TRACKED(ep[i].me_key))
|
||||
return;
|
||||
}
|
||||
DECREASE_TRACK_COUNT
|
||||
_PyObject_GC_UNTRACK(op);
|
||||
}
|
||||
|
||||
|
|
|
@ -50,9 +50,6 @@ PyTuple_New(register Py_ssize_t size)
|
|||
{
|
||||
register PyTupleObject *op;
|
||||
Py_ssize_t i;
|
||||
#ifdef SHOW_TRACK_COUNT
|
||||
count_tracked++;
|
||||
#endif
|
||||
if (size < 0) {
|
||||
PyErr_BadInternalCall();
|
||||
return NULL;
|
||||
|
@ -103,6 +100,9 @@ PyTuple_New(register Py_ssize_t size)
|
|||
++numfree[0];
|
||||
Py_INCREF(op); /* extra INCREF so that this is never freed */
|
||||
}
|
||||
#endif
|
||||
#ifdef SHOW_TRACK_COUNT
|
||||
count_tracked++;
|
||||
#endif
|
||||
_PyObject_GC_TRACK(op);
|
||||
return (PyObject *) op;
|
||||
|
|
Loading…
Reference in New Issue