[pypy-issue] Issue #3048: tracemalloc (pypy/pypy)

Ronan Lamy issues-reply at bitbucket.org
Mon Jul 29 14:24:52 EDT 2019

New issue 3048: tracemalloc

Ronan Lamy:

pypy doesn't implement the tracemalloc module because it’s closely tied to CPython internals. However, quoting from [What’s New In Python 3.6](https://docs.python.org/3/whatsnew/3.6.html#warnings): 

> When a `ResourceWarning` warning is logged, the `tracemalloc` module is now used to try to retrieve the traceback where the destroyed object was allocated.

which is a useful thing to do on any implementation and rather similar to what `pypy2 -X track-resources` does. So:

* is there a sensible way to create a `_tracemalloc` that would make this work like on CPython?
* or should we just enable `-X track-resources` on pypy3?

More information about the pypy-issue mailing list