This is an archive of the discontinued Mercurial Phabricator instance.

utils: helper function to print top memory allocation site
ClosedPublic

Authored by joerg.sonnenberger on Oct 21 2020, 4:30 PM.

Details

Summary

The memorytop function uses Python's tracemalloc module to show the
source lines / backtraces with the largest remaining allocations. This
allows identifying the origins of active memory by placing calls in
strategic locations. Allocations from C extensions will show up as long
as they are using the Python allocators.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.