Author vstinner
Recipients rhettinger, vstinner
Date 2020-01-29.21:31:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1580333474.23.0.132304046963.issue39489@roundup.psfhosted.org>
In-reply-to
Content
Python 2.7.15 got a PYTHONSHOWALLOCCOUNT environment variable to dump statistics on types at exit, if Python is built with COUNT_ALLOCS macro defined.

Example with Fedora python2.7-debug (package python2-debug-2.7.17-1.fc31.x86_64):

$ PYTHONSHOWALLOCCOUNT=1 python2.7-debug -c pass
exceptions.ImportError alloc'd: 2, freed: 2, max in use: 1
symtable entry alloc'd: 3, freed: 3, max in use: 1
enumerate alloc'd: 2, freed: 2, max in use: 1
dict alloc'd: 459, freed: 220, max in use: 346
str alloc'd: 13981, freed: 12142, max in use: 5991
tuple alloc'd: 5088, freed: 4096, max in use: 2337
(...)
fast tuple allocs: 2434, empty: 1753
fast int allocs: pos: 875, neg: 74
null strings: 81, 1-strings: 328
History
Date User Action Args
2020-01-29 21:31:14vstinnersetrecipients: + vstinner, rhettinger
2020-01-29 21:31:14vstinnersetmessageid: <1580333474.23.0.132304046963.issue39489@roundup.psfhosted.org>
2020-01-29 21:31:14vstinnerlinkissue39489 messages
2020-01-29 21:31:14vstinnercreate