New submission from STINNER Victor <vstin...@redhat.com>:

CPython uses many "free lists": list of "deallocated" objects which are kept 
alive to optimize allocation of new objects. For example, the builtin list type 
has a free list.

Problem: tracemalloc only traces the memory allocation when the object is 
created, but it doesn't update the traceback when the "free object" is reused 
to create "a new object".

Attached PR modifies _Py_NewReference() to update the Python traceback in the 
tracemalloc trace.

----------
components: Library (Lib)
messages: 328326
nosy: vstinner
priority: normal
severity: normal
status: open
title: Enhance tracemalloc to trace properly free lists
versions: Python 3.8

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue35053>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to