[issue33565] strange tracemalloc results

STINNER Victor report at bugs.python.org
Tue May 22 09:59:03 EDT 2018


STINNER Victor <vstinner at redhat.com> added the comment:

A memory leak is when each iteration adds a fixed number of bytes of the memory: I'm talking about tracemalloc.get_traced_memory()[0] value. For example, if you compare the total traced memory between your iteration 30 and iteration 20, you get a value 10N. If you compare iteration 100 and 20, I would expect the value 80N. Is it the case?

You can get the number of allocated bytes from a snapshot using:

>>> sum(trace.size for trace in snapshot.traces)
2620350

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33565>
_______________________________________


More information about the Python-bugs-list mailing list