On Tue, Sep 3, 2013 at 7:27 PM, Victor Stinner <victor.stin...@gmail.com>wrote:
> API > === > > To trace the most Python memory allocations, the module should be > enabled as early as possible in your application by calling > ``tracemalloc.enable()`` function, by setting the ``PYTHONTRACEMALLOC`` > environment variable to ``1``, or by using ``-X tracemalloc`` command > line option. > > > Functions > --------- > > ``enable()`` function: > > Start tracing Python memory allocations. > > ``disable()`` function: > > Stop tracing Python memory allocations and stop the timer started by > ``start_timer()``. > > ``is_enabled()`` function: > > Get the status of the module: ``True`` if it is enabled, ``False`` > otherwise. > Please mention that this API is similar to that of faulthandler and add a link to faulthandler docs.
_______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com