Message369987
I never used sys._debugmallocstats() function or PYTHONMALLOCSTATS environment variable, whereas I spend significant time on optimizing memory allocators and free lists. The output is written into stderr which is very convenient to process these data.
I only "re"-discovered recently this debug feature when writing PR 20247 "Make tuple free list per-interpreter": I had to update _PyTuple_DebugMallocStats().
Removing this debug feature reduces the maintenance burden.
Attached PR removes all code related to the sys._debugmallocstats() function and the PYTHONMALLOCSTATS environment variable.
If someone wants to hack Python memory allocators or free lists, I suggest to add temporary code to dump some stats. But I don't think that it's worth it to keep the feature for all uses in Python.
People who worry about the memory usage of their application don't have to go into this low level of details, but care more about memory peak, where the memory was allocated (ex: tracemalloc module), RSS memory, etc. |
|
Date |
User |
Action |
Args |
2020-05-26 14:48:52 | vstinner | set | recipients:
+ vstinner |
2020-05-26 14:48:52 | vstinner | set | messageid: <1590504532.44.0.996467674313.issue40781@roundup.psfhosted.org> |
2020-05-26 14:48:52 | vstinner | link | issue40781 messages |
2020-05-26 14:48:52 | vstinner | create | |
|