Pablo Galindo Salgado <pablog...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue39143>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to