HomeAleph Objects Inc

bpo-35053: Enhance tracemalloc to trace free lists (GH-10063)

Authored by Victor Stinner <vstinner@redhat.com> on Oct 25 2018, 5:31 AM.

Description

bpo-35053: Enhance tracemalloc to trace free lists (GH-10063)

tracemalloc now tries to update the traceback when an object is
reused from a "free list" (optimization for faster object creation,
used by the builtin list type for example).

Changes:

  • Add _PyTraceMalloc_NewReference() function which tries to update the Python traceback of a Python object.
  • _Py_NewReference() now calls _PyTraceMalloc_NewReference().
  • Add an unit test.

Details

Event Timeline

GitHub <noreply@github.com> committed rCP9e00e80e213e: bpo-35053: Enhance tracemalloc to trace free lists (GH-10063) (authored by Victor Stinner <vstinner@redhat.com>).Oct 25 2018, 5:31 AM