<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 3, 2013 at 7:27 PM, Victor Stinner <span dir="ltr"><<a href="mailto:victor.stinner@gmail.com" target="_blank">victor.stinner@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":17t" style="overflow:hidden">API<br>
===<br>
<br>
To trace the most Python memory allocations, the module should be<br>
enabled as early as possible in your application by calling<br>
``tracemalloc.enable()`` function, by setting the ``PYTHONTRACEMALLOC``<br>
environment variable to ``1``, or by using ``-X tracemalloc`` command<br>
line option.<br>
<br>
<br>
Functions<br>
---------<br>
<br>
``enable()`` function:<br>
<br>
Start tracing Python memory allocations.<br>
<br>
``disable()`` function:<br>
<br>
Stop tracing Python memory allocations and stop the timer started by<br>
``start_timer()``.<br>
<br>
``is_enabled()`` function:<br>
<br>
Get the status of the module: ``True`` if it is enabled, ``False``<br>
otherwise.<br></div></blockquote></div><br>Please mention that this API is similar to that of faulthandler and add a link to faulthandler docs. </div></div>