mirror of
https://github.com/python/cpython.git
synced 2025-10-06 23:21:06 +00:00
Add more stats for freelist use and allocations. (GH-92211)
This commit is contained in:
parent
e8d7661ff2
commit
836b17c9c3
9 changed files with 43 additions and 0 deletions
|
@ -141,6 +141,7 @@ PyFloat_FromDouble(double fval)
|
|||
#endif
|
||||
state->free_list = (PyFloatObject *) Py_TYPE(op);
|
||||
state->numfree--;
|
||||
OBJECT_STAT_INC(from_freelist);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
@ -256,6 +257,7 @@ _PyFloat_ExactDealloc(PyObject *obj)
|
|||
state->numfree++;
|
||||
Py_SET_TYPE(op, (PyTypeObject *)state->free_list);
|
||||
state->free_list = op;
|
||||
OBJECT_STAT_INC(to_freelist);
|
||||
#else
|
||||
PyObject_Free(op);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue