[issue39143] Implementing sub-generation steps in the gc
Pablo Galindo Salgado
report at bugs.python.org
Sat Dec 28 22:52:57 EST 2019
Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:
> I'm afraid nailing anything here is hard. For example, I don't know what you did to "measure memory", but if you're using stats reported by the OS, that's fraught with dangers too.
I am interposing a custom allocator to track all the used blocks in all used pools in all arenas and then monitor all the memmap/malloc allocations. I get the same results if I don't use obmalloc (setting the PYTHONMALLOC=malloc) env var, which is more straightforward as I can just interpose a malloc implementation using LD_PRELOAD or a simple custom allocator. I don't claim to be exact but is better than just checking the resident size.
I didn't want to use sys._debugmallocstats() so printing to stdout does not impact performance, as I was also checking that the code does not make the interpreter slower.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39143>
_______________________________________
More information about the Python-bugs-list
mailing list